use of blusunrize.immersiveengineering.api.crafting.IngredientStack in project ImmersiveEngineering by BluSunrize.
the class BelljarHandler method init.
public static void init() {
soilTextureMap.put(new ComparableItemStack(new ItemStack(Blocks.DIRT), false, false), new ResourceLocation("minecraft:blocks/farmland_wet"));
registerHandler(cropHandler);
registerHandler(stemHandler);
registerHandler(stackingHandler);
cropHandler.register(new ItemStack(Items.WHEAT_SEEDS), new ItemStack[] { new ItemStack(Items.WHEAT, 2), new ItemStack(Items.WHEAT_SEEDS, 1) }, new ItemStack(Blocks.DIRT), Blocks.WHEAT.getDefaultState());
cropHandler.register(new ItemStack(Items.POTATO), new ItemStack[] { new ItemStack(Items.POTATO, 2) }, new ItemStack(Blocks.DIRT), Blocks.POTATOES.getDefaultState());
cropHandler.register(new ItemStack(Items.CARROT), new ItemStack[] { new ItemStack(Items.CARROT, 2) }, new ItemStack(Blocks.DIRT), Blocks.CARROTS.getDefaultState());
cropHandler.register(new ItemStack(Items.BEETROOT_SEEDS), new ItemStack[] { new ItemStack(Items.BEETROOT, 2), new ItemStack(Items.BEETROOT_SEEDS, 1) }, new ItemStack(Blocks.DIRT), Blocks.BEETROOTS.getDefaultState());
cropHandler.register(new ItemStack(Items.NETHER_WART), new ItemStack[] { new ItemStack(Items.NETHER_WART, 2) }, new ItemStack(Blocks.SOUL_SAND), Blocks.NETHER_WART.getDefaultState());
stemHandler.register(new ItemStack(Items.PUMPKIN_SEEDS), new ItemStack[] { new ItemStack(Blocks.PUMPKIN) }, new ItemStack(Blocks.DIRT), Blocks.PUMPKIN_STEM.getDefaultState());
stemHandler.register(new ItemStack(Items.MELON_SEEDS), new ItemStack[] { new ItemStack(Blocks.MELON_BLOCK) }, new ItemStack(Blocks.DIRT), Blocks.MELON_STEM.getDefaultState());
stackingHandler.register(new ItemStack(Items.REEDS), new ItemStack[] { new ItemStack(Items.REEDS, 2) }, "sand", Blocks.REEDS.getDefaultState(), Blocks.REEDS.getDefaultState());
stackingHandler.register(new ItemStack(Blocks.CACTUS), new ItemStack[] { new ItemStack(Blocks.CACTUS, 2) }, "sand", Blocks.CACTUS.getDefaultState(), Blocks.CACTUS.getDefaultState());
stackingHandler.register(new ItemStack(Blocks.CHORUS_FLOWER), new ItemStack[] { new ItemStack(Items.CHORUS_FRUIT, 1) }, new ItemStack(Blocks.END_STONE), Blocks.CHORUS_PLANT.getDefaultState().withProperty(BlockChorusPlant.DOWN, true).withProperty(BlockChorusPlant.UP, true), Blocks.CHORUS_PLANT.getDefaultState().withProperty(BlockChorusPlant.DOWN, true).withProperty(BlockChorusPlant.UP, true), Blocks.CHORUS_FLOWER.getDefaultState());
IngredientStack shroomSoil = new IngredientStack(ImmutableList.of(new ItemStack(Blocks.MYCELIUM), new ItemStack(Blocks.DIRT, 1, 2)));
cropHandler.register(new ItemStack(Blocks.RED_MUSHROOM), new ItemStack[] { new ItemStack(Blocks.RED_MUSHROOM, 2) }, shroomSoil, Blocks.RED_MUSHROOM.getDefaultState());
cropHandler.register(new ItemStack(Blocks.BROWN_MUSHROOM), new ItemStack[] { new ItemStack(Blocks.BROWN_MUSHROOM, 2) }, shroomSoil, Blocks.BROWN_MUSHROOM.getDefaultState());
registerFluidFertilizer(new FluidFertilizerHandler() {
@Override
public boolean isValid(@Nullable FluidStack fertilizer) {
return fertilizer != null && fertilizer.getFluid() == FluidRegistry.WATER;
}
@Override
public float getGrowthMultiplier(FluidStack fertilizer, ItemStack seed, ItemStack soil, TileEntity tile) {
return fluidFertilizerModifier;
}
});
registerItemFertilizer(new ItemFertilizerHandler() {
final ItemStack bonemeal = new ItemStack(Items.DYE, 1, 15);
@Override
public boolean isValid(ItemStack fertilizer) {
return !fertilizer.isEmpty() && OreDictionary.itemMatches(bonemeal, fertilizer, true);
}
@Override
public float getGrowthMultiplier(ItemStack fertilizer, ItemStack seed, ItemStack soil, TileEntity tile) {
return solidFertilizerModifier * 1.25f;
}
});
}
Aggregations