Search in sources :

Example 1 with ItemRegistryFluids

use of forestry.core.items.ItemRegistryFluids in project ForestryMC by ForestryMC.

the class ModuleFactory method registerRecipes.

@Override
public void registerRecipes() {
    // / FABRICATOR
    ItemRegistryCore coreItems = ModuleCore.getItems();
    BlockRegistryCore coreBlocks = ModuleCore.getBlocks();
    ItemRegistryFluids fluidItems = ModuleFluids.getItems();
    BlockRegistryFactory blocks = getBlocks();
    ItemElectronTube electronTube = coreItems.tubes;
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.COPPER, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotCopper" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.TIN, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotTin" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.BRONZE, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotBronze" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.IRON, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotIron" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.GOLD, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "ingotGold" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.DIAMOND, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemDiamond" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.OBSIDIAN, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', Blocks.OBSIDIAN });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.BLAZE, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', Items.BLAZE_POWDER });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.EMERALD, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemEmerald" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.APATITE, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', "gemApatite" });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.LAPIS, 4), new Object[] { " X ", "#X#", "XXX", '#', "dustRedstone", 'X', new ItemStack(Items.DYE, 1, 4) });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.ENDER, 4), new Object[] { " X ", "#X#", "XXX", '#', new ItemStack(Items.ENDER_EYE, 1, 0), 'X', new ItemStack(Blocks.END_STONE, 1, 0) });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), electronTube.get(EnumElectronTube.ORCHID, 4), new Object[] { " X ", "#X#", "XXX", '#', new ItemStack(Items.REPEATER, 1, 0), 'X', new ItemStack(Blocks.REDSTONE_ORE, 1, 0) });
    RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), coreItems.flexibleCasing.getItemStack(), new Object[] { "#E#", "B B", "#E#", '#', OreDictUtil.INGOT_BRONZE, 'B', OreDictUtil.SLIMEBALL, 'E', "gemEmerald" });
    String[] dyes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite" };
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
        ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
        FluidStack liquidGlass = Fluids.GLASS.getFluid(Fluid.BUCKET_VOLUME);
        FluidStack liquidGlassX4 = Fluids.GLASS.getFluid(Fluid.BUCKET_VOLUME * 4);
        for (int i = 0; i < 16; i++) {
            RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlass, new ItemStack(Blocks.STAINED_GLASS, 4, 15 - i), new Object[] { "#", "X", '#', dyes[i], 'X', beeItems.propolis.getWildcard() });
        }
        RecipeManagers.fabricatorManager.addRecipe(beeItems.waxCast.getWildcard(), liquidGlassX4, new ItemStack(Blocks.GLASS, 1, 0), new Object[] { "X", 'X', beeItems.propolis.getWildcard() });
    }
    // / SQUEEZER
    int appleMulchAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.mulch.apple");
    int appleJuiceAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.apple");
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.APPLE), Fluids.JUICE.getFluid(appleJuiceAmount), coreItems.mulch.getItemStack(), appleMulchAmount);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.CARROT), Fluids.JUICE.getFluid(appleJuiceAmount), coreItems.mulch.getItemStack(), appleMulchAmount);
    int seedOilAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.seed");
    FluidStack seedOil = Fluids.SEED_OIL.getFluid(seedOilAmount);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.WHEAT_SEEDS), seedOil);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.PUMPKIN_SEEDS), seedOil);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.MELON_SEEDS), seedOil);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Items.BEETROOT_SEEDS), seedOil);
    RecipeManagers.squeezerManager.addRecipe(10, new ItemStack(Blocks.CACTUS), new FluidStack(FluidRegistry.WATER, 500));
    NonNullList<ItemStack> lavaRecipeResources = NonNullList.create();
    lavaRecipeResources.add(coreItems.phosphor.getItemStack(2));
    lavaRecipeResources.add(new ItemStack(Blocks.COBBLESTONE));
    RecipeManagers.squeezerManager.addRecipe(10, lavaRecipeResources, new FluidStack(FluidRegistry.LAVA, 1600));
    NonNullList<ItemStack> iceRecipeResources = NonNullList.create();
    iceRecipeResources.add(new ItemStack(Items.SNOWBALL));
    iceRecipeResources.add(coreItems.craftingMaterial.getIceShard(4));
    RecipeManagers.squeezerManager.addRecipe(10, iceRecipeResources, Fluids.ICE.getFluid(4000));
    // STILL
    RecipeManagers.stillManager.addRecipe(Constants.STILL_DESTILLATION_DURATION, Fluids.BIOMASS.getFluid(Constants.STILL_DESTILLATION_INPUT), Fluids.BIO_ETHANOL.getFluid(Constants.STILL_DESTILLATION_OUTPUT));
    // MOISTENER
    RecipeManagers.moistenerManager.addRecipe(new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Blocks.MYCELIUM), 5000);
    RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.COBBLESTONE), new ItemStack(Blocks.MOSSY_COBBLESTONE), 20000);
    RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.STONEBRICK), new ItemStack(Blocks.STONEBRICK, 1, 1), 20000);
    RecipeManagers.moistenerManager.addRecipe(new ItemStack(Blocks.LEAVES, 1, EnumType.SPRUCE.ordinal()), new ItemStack(Blocks.DIRT, 1, DirtType.PODZOL.ordinal()), 5000);
    // FERMENTER
    RecipeUtil.addFermenterRecipes(OreDictUtil.TREE_SAPLING, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(OreDictUtil.BLOCK_CACTUS, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(OreDictUtil.CROP_WHEAT, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(OreDictUtil.CROP_POTATO, 2 * ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(OreDictUtil.SUGARCANE, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.cane"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.BROWN_MUSHROOM), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
    RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.RED_MUSHROOM), ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
    // FABRICATOR
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.GLASS), Fluids.GLASS.getFluid(1000), 1000);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.GLASS_PANE), Fluids.GLASS.getFluid(375), 1000);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.SAND), Fluids.GLASS.getFluid(1000), 3000);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.SAND, 1, 1), Fluids.GLASS.getFluid(1000), 3000);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.SANDSTONE), Fluids.GLASS.getFluid(4000), 4800);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.SANDSTONE, 1, 1), Fluids.GLASS.getFluid(4000), 4800);
    RecipeManagers.fabricatorSmeltingManager.addSmelting(new ItemStack(Blocks.SANDSTONE, 1, 2), Fluids.GLASS.getFluid(4000), 4800);
    // / CARPENTER
    RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEED_OIL.getFluid(250), ItemStack.EMPTY, coreItems.impregnatedCasing.getItemStack(), "###", "# #", "###", '#', "logWood");
    RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEED_OIL.getFluid(500), ItemStack.EMPTY, new ItemStack(coreBlocks.escritoire), "#  ", "###", "# #", '#', "plankWood");
    // RESOURCES
    RecipeManagers.carpenterManager.addRecipe(10, Fluids.SEED_OIL.getFluid(100), ItemStack.EMPTY, coreItems.stickImpregnated.getItemStack(2), "#", "#", '#', "logWood");
    RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 250), ItemStack.EMPTY, coreItems.woodPulp.getItemStack(4), "#", '#', "logWood");
    RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 250), ItemStack.EMPTY, new ItemStack(Items.PAPER, 1), "#", "#", '#', "pulpWood");
    RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, new ItemStack(coreBlocks.humus, 9), "###", "#X#", "###", '#', Blocks.DIRT, 'X', coreItems.mulch);
    RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, coreBlocks.bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, 8), "#X#", "XYX", "#X#", '#', Blocks.DIRT, 'X', "sand", 'Y', coreItems.mulch);
    RecipeManagers.carpenterManager.addRecipe(75, new FluidStack(FluidRegistry.WATER, 5000), ItemStack.EMPTY, coreItems.hardenedCasing.getItemStack(), "# #", " Y ", "# #", '#', "gemDiamond", 'Y', coreItems.sturdyCasing);
    // / CHIPSETS
    ItemStack basicCircuitboard = ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.BASIC, null, new ICircuit[] {});
    ItemStack enhancedCircuitboard = ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.ENHANCED, null, new ICircuit[] {});
    ItemStack refinedCircuitboard = ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.REFINED, null, new ICircuit[] {});
    ItemStack intricateCircuitboard = ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.INTRICATE, null, new ICircuit[] {});
    RecipeManagers.carpenterManager.addRecipe(20, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, basicCircuitboard, "R R", "R#R", "R R", '#', "ingotTin", 'R', "dustRedstone");
    RecipeManagers.carpenterManager.addRecipe(40, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, enhancedCircuitboard, "R#R", "R#R", "R#R", '#', "ingotBronze", 'R', "dustRedstone");
    RecipeManagers.carpenterManager.addRecipe(80, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, refinedCircuitboard, "R#R", "R#R", "R#R", '#', "ingotIron", 'R', "dustRedstone");
    RecipeManagers.carpenterManager.addRecipe(80, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, intricateCircuitboard, "R#R", "R#R", "R#R", '#', "ingotGold", 'R', "dustRedstone");
    RecipeManagers.carpenterManager.addRecipe(40, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, coreItems.solderingIron.getItemStack(), " # ", "# #", "  B", '#', "ingotIron", 'B', "ingotBronze");
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
        ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
        RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, coreItems.iodineCharge.getItemStack(), "Z#Z", "#Y#", "X#X", '#', beeItems.pollenCluster.getWildcard(), 'X', Items.GUNPOWDER, 'Y', fluidItems.canEmpty, 'Z', beeItems.honeyDrop);
        RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, coreItems.craftingMaterial.getDissipationCharge(), "Z#Z", "#Y#", "X#X", '#', beeItems.royalJelly, 'X', Items.GUNPOWDER, 'Y', fluidItems.canEmpty, 'Z', beeItems.honeydew);
    }
    // Ender pearl
    RecipeManagers.carpenterManager.addRecipe(100, ItemStack.EMPTY, new ItemStack(Items.ENDER_PEARL, 1), " # ", "###", " # ", '#', coreItems.craftingMaterial.getPulsatingMesh());
    // Woven Silk
    RecipeManagers.carpenterManager.addRecipe(10, new FluidStack(FluidRegistry.WATER, 500), ItemStack.EMPTY, coreItems.craftingMaterial.getWovenSilk(), "###", "###", "###", '#', coreItems.craftingMaterial.getSilkWisp());
    // Boxes
    RecipeManagers.carpenterManager.addRecipe(5, new FluidStack(FluidRegistry.WATER, 1000), ItemStack.EMPTY, coreItems.carton.getItemStack(2), " # ", "# #", " # ", '#', "pulpWood");
    // Assembly Kits
    RecipeManagers.carpenterManager.addRecipe(20, null, coreItems.carton.getItemStack(), coreItems.kitPickaxe.getItemStack(), new Object[] { "###", " X ", " X ", '#', "ingotBronze", 'X', "stickWood" });
    RecipeManagers.carpenterManager.addRecipe(20, null, coreItems.carton.getItemStack(), coreItems.kitShovel.getItemStack(), new Object[] { " # ", " X ", " X ", '#', "ingotBronze", 'X', "stickWood" });
    // Reclamation
    ItemStack ingotBronze = coreItems.ingotBronze.copy();
    ingotBronze.setCount(2);
    RecipeManagers.carpenterManager.addRecipe(ItemStack.EMPTY, ingotBronze, "#", '#', coreItems.brokenBronzePickaxe);
    ingotBronze = ingotBronze.copy();
    ingotBronze.setCount(1);
    RecipeManagers.carpenterManager.addRecipe(ItemStack.EMPTY, ingotBronze, "#", '#', coreItems.brokenBronzeShovel);
    // Crating and uncrating
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.CRATE))) {
        ModuleCrates.createCrateRecipes();
    }
    ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.machine.upgrade");
    // / Solder Manager
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.EMERALD, 1), Circuits.machineSpeedUpgrade1);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.machineSpeedUpgrade2);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.machineEfficiencyUpgrade1);
    RecipeUtil.addRecipe("bottler", blocks.bottler, "X#X", "#Y#", "X#X", '#', "blockGlass", 'X', fluidItems.canEmpty, 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("carpenter", blocks.carpenter, "X#X", "XYX", "X#X", '#', "blockGlass", 'X', "ingotBronze", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("centrifuge", blocks.centrifuge, "X#X", "XYX", "X#X", '#', "blockGlass", 'X', "ingotCopper", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("fermenter", blocks.fermenter, "X#X", "#Y#", "X#X", '#', "blockGlass", 'X', "gearBronze", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("moistener", blocks.moistener, "X#X", "#Y#", "X#X", '#', "blockGlass", 'X', "gearCopper", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("squeezer", blocks.squeezer, "X#X", "XYX", "X#X", '#', "blockGlass", 'X', "ingotTin", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("still", blocks.still, "X#X", "#Y#", "X#X", '#', "blockGlass", 'X', "dustRedstone", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("rainmaker", blocks.rainmaker, "X#X", "#Y#", "X#X", '#', "blockGlass", 'X', "gearTin", 'Y', coreItems.hardenedCasing);
    RecipeUtil.addRecipe("fabricator", blocks.fabricator, "X#X", "#Y#", "XZX", '#', "blockGlass", 'X', "ingotGold", 'Y', coreItems.sturdyCasing, 'Z', "chestWood");
    RecipeUtil.addRecipe("raintank", blocks.raintank, "X#X", "XYX", "X#X", '#', "blockGlass", 'X', "ingotIron", 'Y', coreItems.sturdyCasing);
}
Also used : BlockRegistryCore(forestry.core.blocks.BlockRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) BlockRegistryFactory(forestry.factory.blocks.BlockRegistryFactory) ItemElectronTube(forestry.core.items.ItemElectronTube) ICircuitLayout(forestry.api.circuits.ICircuitLayout) ItemRegistryCore(forestry.core.items.ItemRegistryCore) ResourceLocation(net.minecraft.util.ResourceLocation) ItemRegistryFluids(forestry.core.items.ItemRegistryFluids) ItemStack(net.minecraft.item.ItemStack)

Example 2 with ItemRegistryFluids

use of forestry.core.items.ItemRegistryFluids in project ForestryMC by ForestryMC.

the class ModuleApiculture method registerRecipes.

@Override
public void registerRecipes() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    ItemRegistryFluids fluidItems = ModuleFluids.getItems();
    ItemRegistryApiculture items = getItems();
    BlockRegistryApiculture blocks = getBlocks();
    // / APIARIST'S ARMOR
    ItemStack wovenSilk = coreItems.craftingMaterial.getWovenSilk();
    RecipeUtil.addRecipe("apiarist_hat", items.apiaristHat, "###", "# #", '#', wovenSilk);
    RecipeUtil.addRecipe("apiarist_chest", items.apiaristChest, "# #", "###", "###", '#', wovenSilk);
    RecipeUtil.addRecipe("apiarist_legs", items.apiaristLegs, "###", "# #", "# #", '#', wovenSilk);
    RecipeUtil.addRecipe("apiarist_boots", items.apiaristBoots, "# #", "# #", '#', wovenSilk);
    // / HABITAT LOCATOR
    RecipeUtil.addRecipe("habitat_locator", items.habitatLocator, " X ", "X#X", " X ", '#', OreDictUtil.DUST_REDSTONE, 'X', OreDictUtil.INGOT_BRONZE);
    // Bees
    RecipeUtil.addRecipe("scoop", items.scoop, "#X#", "###", " # ", '#', OreDictUtil.STICK_WOOD, 'X', OreDictUtil.BLOCK_WOOL);
    RecipeUtil.addRecipe("smoker", items.smoker, "LS#", "LF#", "###", '#', "ingotTin", 'S', OreDictUtil.STICK_WOOD, 'F', Items.FLINT_AND_STEEL, 'L', OreDictUtil.LEATHER);
    RecipeUtil.addRecipe("propolis_to_slime", new ItemStack(Items.SLIME_BALL), "#X#", "#X#", "#X#", '#', items.propolis, 'X', items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
    RecipeUtil.addRecipe("honey_melon", new ItemStack(Items.SPECKLED_MELON), "#X#", "#Y#", "#X#", '#', items.honeyDrop, 'X', items.honeydew, 'Y', Items.MELON);
    RecipeUtil.addRecipe("frame_untreated", items.frameUntreated, "###", "#S#", "###", '#', OreDictUtil.STICK_WOOD, 'S', Items.STRING);
    RecipeUtil.addRecipe("frame_impregnated", items.frameImpregnated, "###", "#S#", "###", '#', coreItems.stickImpregnated, 'S', Items.STRING);
    RecipeUtil.addRecipe("bee_house_minecart", items.minecartBeehouse.getBeeHouseMinecart(), "B", "C", 'B', new ItemStack(blocks.beeHouse), 'C', Items.MINECART);
    RecipeUtil.addRecipe("apiary_minecart", items.minecartBeehouse.getApiaryMinecart(), "B", "C", 'B', new ItemStack(blocks.apiary), 'C', Items.MINECART);
    for (int blockCount = 0; blockCount < blocks.beeCombs.length; blockCount++) {
        BlockHoneyComb block = blocks.beeCombs[blockCount];
        for (int blockMeta = 0; blockMeta < EnumHoneyComb.VALUES.length - blockCount * 16; blockMeta++) {
            int itemMeta = blockMeta + blockCount * 16;
            RecipeUtil.addRecipe("comb." + itemMeta, new ItemStack(block, 1, blockMeta), "###", "###", "###", '#', items.beeComb.get(EnumHoneyComb.get(itemMeta), 1));
        }
    }
    // FOOD STUFF
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FOOD))) {
        ItemRegistryFood foodItems = ModuleFood.getItems();
        RecipeUtil.addRecipe("honeyed_slice", new ItemStack(foodItems.honeyedSlice, 4), "###", "#X#", "###", '#', items.honeyDrop, 'X', Items.BREAD);
        RecipeUtil.addRecipe("honey_pot", foodItems.honeyPot, "# #", " X ", "# #", '#', items.honeyDrop, 'X', fluidItems.waxCapsuleEmpty);
        RecipeUtil.addRecipe("ambrosia", foodItems.ambrosia, "#Y#", "XXX", "###", '#', items.honeydew, 'X', items.royalJelly, 'Y', fluidItems.waxCapsuleEmpty);
    }
    // / CAPSULES
    int outputCapsuleAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.capsule");
    if (outputCapsuleAmount > 0) {
        ItemStack capsule = fluidItems.waxCapsuleEmpty.getItemStack(outputCapsuleAmount);
        RecipeUtil.addRecipe("wax_capsule", capsule, "###", '#', coreItems.beeswax);
    }
    int outputRefractoryAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.refractory");
    if (outputRefractoryAmount > 0) {
        ItemStack capsule = fluidItems.refractoryEmpty.getItemStack(outputRefractoryAmount);
        RecipeUtil.addRecipe("refractory_capsule", capsule, "###", '#', coreItems.refractoryWax);
    }
    // / BITUMINOUS PEAT
    RecipeUtil.addRecipe("bituminous_peat", coreItems.bituminousPeat.getItemStack(), " # ", "XYX", " # ", '#', OreDictUtil.DUST_ASH, 'X', coreItems.peat, 'Y', items.propolis);
    // / TORCHES
    RecipeUtil.addRecipe("beeswax_worth", new ItemStack(Blocks.TORCH, 3), " # ", " # ", " Y ", '#', coreItems.beeswax, 'Y', OreDictUtil.STICK_WOOD);
    RecipeUtil.addRecipe("pulsating_mesh", coreItems.craftingMaterial.getPulsatingMesh(), "# #", " # ", "# #", '#', items.propolis.get(EnumPropolis.PULSATING, 1));
    // / WAX CAST
    RecipeUtil.addRecipe("wax_cast", items.waxCast, "###", "# #", "###", '#', coreItems.beeswax);
    // / ALVEARY
    ItemStack alvearyPlainBlock = blocks.getAlvearyBlock(BlockAlvearyType.PLAIN);
    RecipeUtil.addRecipe("alveary_plain", alvearyPlainBlock, "###", "#X#", "###", 'X', coreItems.impregnatedCasing, '#', coreItems.craftingMaterial.getScentedPaneling());
    // SWARMER
    RecipeUtil.addRecipe("alveary_swarmer", blocks.getAlvearyBlock(BlockAlvearyType.SWARMER), "#G#", " X ", "#G#", '#', coreItems.tubes.get(EnumElectronTube.DIAMOND, 1), 'X', alvearyPlainBlock, 'G', OreDictUtil.INGOT_GOLD);
    // FAN
    RecipeUtil.addRecipe("alveary_fan", blocks.getAlvearyBlock(BlockAlvearyType.FAN), "I I", " X ", "I#I", '#', coreItems.tubes.get(EnumElectronTube.GOLD, 1), 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON);
    // HEATER
    RecipeUtil.addRecipe("alveary_heater", blocks.getAlvearyBlock(BlockAlvearyType.HEATER), "#I#", " X ", "YYY", '#', coreItems.tubes.get(EnumElectronTube.GOLD, 1), 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'Y', OreDictUtil.STONE);
    // HYGROREGULATOR
    RecipeUtil.addRecipe("alveary_hygro", blocks.getAlvearyBlock(BlockAlvearyType.HYGRO), "GIG", "GXG", "GIG", 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'G', OreDictUtil.BLOCK_GLASS);
    // STABILISER
    RecipeUtil.addRecipe("alveary_stabiliser", blocks.getAlvearyBlock(BlockAlvearyType.STABILISER), "G G", "GXG", "G G", 'X', alvearyPlainBlock, 'G', OreDictUtil.GEM_QUARTZ);
    // SIEVE
    RecipeUtil.addRecipe("alveary_sieve", blocks.getAlvearyBlock(BlockAlvearyType.SIEVE), "III", " X ", "WWW", 'X', alvearyPlainBlock, 'I', OreDictUtil.INGOT_IRON, 'W', coreItems.craftingMaterial.getWovenSilk());
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FACTORY))) {
        // / SQUEEZER
        FluidStack honeyDropFluid = Fluids.FOR_HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP);
        RecipeManagers.squeezerManager.addRecipe(10, items.honeyDrop.getItemStack(), honeyDropFluid, items.propolis.getItemStack(), 5);
        RecipeManagers.squeezerManager.addRecipe(10, items.honeydew.getItemStack(), honeyDropFluid);
        ItemStack phosphor = coreItems.phosphor.getItemStack(2);
        NonNullList<ItemStack> lavaIngredients = NonNullList.create();
        lavaIngredients.add(phosphor);
        lavaIngredients.add(new ItemStack(Blocks.SAND));
        RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 2000));
        lavaIngredients = NonNullList.create();
        lavaIngredients.add(phosphor);
        lavaIngredients.add(new ItemStack(Blocks.SAND, 1, 1));
        RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 2000));
        lavaIngredients = NonNullList.create();
        lavaIngredients.add(phosphor);
        lavaIngredients.add(new ItemStack(Blocks.DIRT));
        RecipeManagers.squeezerManager.addRecipe(10, lavaIngredients, new FluidStack(FluidRegistry.LAVA, 1600));
        // / CARPENTER
        RecipeManagers.carpenterManager.addRecipe(50, Fluids.FOR_HONEY.getFluid(500), ItemStack.EMPTY, coreItems.craftingMaterial.getScentedPaneling(), " J ", "###", "WPW", '#', OreDictUtil.PLANK_WOOD, 'J', items.royalJelly, 'W', coreItems.beeswax, 'P', items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
        RecipeManagers.carpenterManager.addRecipe(30, new FluidStack(FluidRegistry.WATER, 600), ItemStack.EMPTY, blocks.candle.getUnlitCandle(24), " X ", "###", "###", '#', coreItems.beeswax, 'X', Items.STRING);
        RecipeManagers.carpenterManager.addRecipe(10, new FluidStack(FluidRegistry.WATER, 200), ItemStack.EMPTY, blocks.candle.getUnlitCandle(6), "#X#", '#', coreItems.beeswax, 'X', coreItems.craftingMaterial.getSilkWisp());
        RecipeUtil.addShapelessRecipe("candle_unlit_reset", blocks.candle.getUnlitCandle(1), blocks.candle.getUnlitCandle(1));
        RecipeUtil.addShapelessRecipe("candle_lit_reset", blocks.candle.getLitCandle(1), blocks.candle.getLitCandle(1));
        // / CENTRIFUGE
        // Honey combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.HONEY, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
        // Cocoa combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.COCOA, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, new ItemStack(Items.DYE, 1, 3), 0.5f));
        // Simmering combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.SIMMERING, 1), ImmutableMap.of(coreItems.refractoryWax.getItemStack(), 1.0f, coreItems.phosphor.getItemStack(2), 0.7f));
        // Stringy combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.STRINGY, 1), ImmutableMap.of(items.propolis.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
        // Dripping combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.DRIPPING, 1), ImmutableMap.of(items.honeydew.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
        // Frozen combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.FROZEN, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 0.8f, items.honeyDrop.getItemStack(), 0.7f, new ItemStack(Items.SNOWBALL), 0.4f, items.pollenCluster.get(EnumPollenCluster.CRYSTALLINE, 1), 0.2f));
        // Silky combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.SILKY, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 1.0f, items.propolis.get(EnumPropolis.SILKY, 1), 0.8f));
        // Parched combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.PARCHED, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
        // Mysterious combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1), ImmutableMap.of(items.propolis.get(EnumPropolis.PULSATING, 1), 1.0f, items.honeyDrop.getItemStack(), 0.4f));
        // Irradiated combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.IRRADIATED, 1), ImmutableMap.of());
        // Powdery combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.POWDERY, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 0.2f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.GUNPOWDER), 0.9f));
        // Wheaten Combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.WHEATEN, 1), ImmutableMap.of(items.honeyDrop.getItemStack(), 0.2f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.WHEAT), 0.8f));
        // Mossy Combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MOSSY, 1), ImmutableMap.of(coreItems.beeswax.getItemStack(), 1.0f, items.honeyDrop.getItemStack(), 0.9f));
        // Mellow Combs
        RecipeManagers.centrifugeManager.addRecipe(20, items.beeComb.get(EnumHoneyComb.MELLOW, 1), ImmutableMap.of(items.honeydew.getItemStack(), 0.6f, coreItems.beeswax.getItemStack(), 0.2f, new ItemStack(Items.QUARTZ), 0.3f));
        // Silky Propolis
        RecipeManagers.centrifugeManager.addRecipe(5, items.propolis.get(EnumPropolis.SILKY, 1), ImmutableMap.of(coreItems.craftingMaterial.getSilkWisp(), 0.6f, items.propolis.getItemStack(), 0.1f));
        // / FERMENTER
        RecipeManagers.fermenterManager.addRecipe(items.honeydew.getItemStack(), 500, 1.0f, Fluids.SHORT_MEAD.getFluid(1), Fluids.FOR_HONEY.getFluid(1));
    }
    RecipeUtil.addRecipe("apiary", blocks.apiary, "XXX", "#C#", "###", 'X', OreDictUtil.SLAB_WOOD, '#', OreDictUtil.PLANK_WOOD, 'C', coreItems.impregnatedCasing);
    RecipeUtil.addRecipe("bee_chest", blocks.beeChest, " # ", "XYX", "XXX", '#', OreDictUtil.BLOCK_GLASS, 'X', OreDictUtil.BEE_COMB, 'Y', OreDictUtil.CHEST_WOOD);
    RecipeUtil.addRecipe("bee_house", blocks.beeHouse, "XXX", "#C#", "###", 'X', OreDictUtil.SLAB_WOOD, '#', OreDictUtil.PLANK_WOOD, 'C', OreDictUtil.BEE_COMB);
    // BREWING RECIPES
    BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), items.pollenCluster.get(EnumPollenCluster.NORMAL, 1), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.HEALING));
    BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), items.pollenCluster.get(EnumPollenCluster.CRYSTALLINE, 1), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.REGENERATION));
}
Also used : BlockRegistryApiculture(forestry.apiculture.blocks.BlockRegistryApiculture) ItemRegistryFood(forestry.food.items.ItemRegistryFood) ItemRegistryCore(forestry.core.items.ItemRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) ResourceLocation(net.minecraft.util.ResourceLocation) ItemRegistryFluids(forestry.core.items.ItemRegistryFluids) ItemStack(net.minecraft.item.ItemStack) BlockHoneyComb(forestry.apiculture.blocks.BlockHoneyComb)

Example 3 with ItemRegistryFluids

use of forestry.core.items.ItemRegistryFluids in project ForestryMC by ForestryMC.

the class ModuleCore method registerRecipes.

@Override
public void registerRecipes() {
    BlockRegistryCore blocks = getBlocks();
    ItemRegistryCore items = getItems();
    ItemRegistryFluids fluidItems = ModuleFluids.getItems();
    /* SMELTING RECIPES */
    RecipeUtil.addSmelting(blocks.resources.get(EnumResourceType.APATITE, 1), items.apatite, 0.5f);
    RecipeUtil.addSmelting(blocks.resources.get(EnumResourceType.COPPER, 1), items.ingotCopper, 0.5f);
    RecipeUtil.addSmelting(blocks.resources.get(EnumResourceType.TIN, 1), items.ingotTin, 0.5f);
    RecipeUtil.addSmelting(new ItemStack(items.peat), items.ash, 0.0f);
    /* BRONZE INGOTS */
    if (Config.isCraftingBronzeEnabled()) {
        ItemStack ingotBronze = items.ingotBronze.copy();
        ingotBronze.setCount(4);
        RecipeUtil.addShapelessRecipe("bronze_ingot", ingotBronze, OreDictUtil.INGOT_TIN, OreDictUtil.INGOT_COPPER, OreDictUtil.INGOT_COPPER, OreDictUtil.INGOT_COPPER);
    }
    /* STURDY MACHINE */
    RecipeUtil.addRecipe("sturdy_casing", items.sturdyCasing, "###", "# #", "###", '#', OreDictUtil.INGOT_BRONZE);
    // / EMPTY CANS
    int canAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.can");
    ItemStack canOutput = fluidItems.canEmpty.getItemStack(canAmount);
    RecipeUtil.addRecipe("tin_can", canOutput, " # ", "# #", '#', OreDictUtil.INGOT_TIN);
    // / GEARS
    List<ItemStack> stoneGear = OreDictionary.getOres(OreDictUtil.GEAR_STONE);
    Object gearCenter;
    if (!stoneGear.isEmpty()) {
        gearCenter = OreDictUtil.GEAR_STONE;
    } else {
        gearCenter = OreDictUtil.INGOT_COPPER;
    }
    RecipeUtil.addRecipe("gear_bronze", items.gearBronze, " # ", "#X#", " # ", '#', OreDictUtil.INGOT_BRONZE, 'X', gearCenter);
    RecipeUtil.addRecipe("gear_copper", items.gearCopper, " # ", "#X#", " # ", '#', OreDictUtil.INGOT_COPPER, 'X', gearCenter);
    RecipeUtil.addRecipe("gear_tin", items.gearTin, " # ", "#X#", " # ", '#', OreDictUtil.INGOT_TIN, 'X', gearCenter);
    // / SURVIVALIST TOOLS
    RecipeUtil.addRecipe("bronze_pickaxe", items.bronzePickaxe, " X ", " X ", "###", '#', OreDictUtil.INGOT_BRONZE, 'X', OreDictUtil.STICK_WOOD);
    RecipeUtil.addRecipe("bronze_shovel", items.bronzeShovel, " X ", " X ", " # ", '#', OreDictUtil.INGOT_BRONZE, 'X', OreDictUtil.STICK_WOOD);
    RecipeUtil.addShapelessRecipe("pickaxe_kit", items.kitPickaxe, items.bronzePickaxe, items.carton);
    RecipeUtil.addShapelessRecipe("shovel_kit", items.kitShovel, items.bronzeShovel, items.carton);
    /* NATURALIST'S ARMOR */
    RecipeUtil.addRecipe("spectacles", items.spectacles, " X ", "Y Y", 'X', OreDictUtil.INGOT_BRONZE, 'Y', OreDictUtil.PANE_GLASS);
    // / WRENCH
    RecipeUtil.addRecipe("wrench", items.wrench, "# #", " # ", " # ", '#', OreDictUtil.INGOT_BRONZE);
    // / WEB
    RecipeUtil.addRecipe("silk_wisp_to_web", new ItemStack(Blocks.WEB, 4), "# #", " # ", "# #", '#', items.craftingMaterial.getSilkWisp());
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FACTORY))) {
        // / CARPENTER
        // Portable ANALYZER
        RecipeManagers.carpenterManager.addRecipe(100, new FluidStack(FluidRegistry.WATER, 2000), ItemStack.EMPTY, items.portableAlyzer.getItemStack(), "X#X", "X#X", "RDR", '#', OreDictUtil.PANE_GLASS, 'X', OreDictUtil.INGOT_TIN, 'R', OreDictUtil.DUST_REDSTONE, 'D', OreDictUtil.GEM_DIAMOND);
        // Camouflaged Paneling
        RecipeManagers.carpenterManager.addRecipe(50, Fluids.BIOMASS.getFluid(500), ItemStack.EMPTY, items.craftingMaterial.getCamouflagedPaneling(8), "Y#R", "BPB", "R#Y", '#', OreDictUtil.PLANK_WOOD, 'R', OreDictUtil.DUST_REDSTONE, 'P', OreDictUtil.PULP_WOOD, 'R', OreDictUtil.DYE_RED, 'B', OreDictUtil.DYE_BLUE, 'Y', OreDictUtil.DYE_YELLOW);
    } else {
        // Portable ANALYZER
        RecipeUtil.addRecipe("portable_alyzer", items.portableAlyzer.getItemStack(), "X#X", "X#X", "RDR", '#', OreDictUtil.PANE_GLASS, 'X', OreDictUtil.INGOT_TIN, 'R', OreDictUtil.DUST_REDSTONE, 'D', OreDictUtil.GEM_DIAMOND);
        // Camouflaged Paneling
        RecipeUtil.addRecipe("camoflaged_paneling", items.craftingMaterial.getCamouflagedPaneling(8), "WWW", "YBR", "WWW", 'W', OreDictUtil.PLANK_WOOD, 'Y', OreDictUtil.DYE_YELLOW, 'B', OreDictUtil.DYE_BLUE, 'R', OreDictUtil.DYE_RED);
    }
    // ANALYZER
    RecipeUtil.addRecipe("alyzer", blocks.analyzer, "XTX", " Y ", "X X", 'Y', items.sturdyCasing, 'T', items.portableAlyzer, 'X', OreDictUtil.INGOT_BRONZE);
    // Manure and Fertilizer
    int compostWheatAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.compost.wheat");
    if (compostWheatAmount > 0) {
        ItemStack compost = items.compost.getItemStack(compostWheatAmount);
        RecipeUtil.addRecipe("wheat_to_compost", compost, " X ", "X#X", " X ", '#', Blocks.DIRT, 'X', OreDictUtil.CROP_WHEAT);
    }
    int compostAshAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.compost.ash");
    if (compostAshAmount > 0) {
        ItemStack compost = items.compost.getItemStack(compostAshAmount);
        RecipeUtil.addRecipe("ash_to_compost", compost, " X ", "X#X", " X ", '#', Blocks.DIRT, 'X', OreDictUtil.DUST_ASH);
    }
    int fertilizerApatiteAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.fertilizer.apatite");
    if (fertilizerApatiteAmount > 0) {
        ItemStack fertilizer = items.fertilizerCompound.getItemStack(fertilizerApatiteAmount);
        RecipeUtil.addRecipe("sand_to_fertilizer", fertilizer, " # ", " X ", " # ", '#', OreDictUtil.SAND, 'X', OreDictUtil.GEM_APATITE);
    }
    int fertilizerAshAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.fertilizer.ash");
    if (fertilizerAshAmount > 0) {
        ItemStack fertilizer = items.fertilizerCompound.getItemStack(fertilizerAshAmount);
        RecipeUtil.addRecipe("ash_to_fertilizer", fertilizer, "###", "#X#", "###", '#', OreDictUtil.DUST_ASH, 'X', OreDictUtil.GEM_APATITE);
    }
    // Humus
    int humusCompostAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.humus.compost");
    if (humusCompostAmount > 0) {
        ItemStack humus = new ItemStack(blocks.humus, humusCompostAmount);
        RecipeUtil.addRecipe("compost_humus", humus, "###", "#X#", "###", '#', Blocks.DIRT, 'X', items.compost);
    }
    int humusFertilizerAmount = ForestryAPI.activeMode.getIntegerSetting("recipe.output.humus.fertilizer");
    if (humusFertilizerAmount > 0) {
        ItemStack humus = new ItemStack(blocks.humus, humusFertilizerAmount);
        RecipeUtil.addRecipe("fertilizer_humus", humus, "###", "#X#", "###", '#', Blocks.DIRT, 'X', items.fertilizerCompound);
    }
    // Bog earth
    int bogEarthOutputBucket = ForestryAPI.activeMode.getIntegerSetting("recipe.output.bogearth.bucket");
    if (bogEarthOutputBucket > 0) {
        ItemStack bogEarth = blocks.bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, bogEarthOutputBucket);
        RecipeUtil.addRecipe("bucket_bog_earth", bogEarth, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', Items.WATER_BUCKET, 'Y', OreDictUtil.SAND);
    }
    int bogEarthOutputCan = ForestryAPI.activeMode.getIntegerSetting("recipe.output.bogearth.can");
    if (bogEarthOutputCan > 0) {
        ItemStack bogEarth = blocks.bogEarth.get(BlockBogEarth.SoilType.BOG_EARTH, bogEarthOutputCan);
        ItemStack canWater = fluidItems.getContainer(EnumContainerType.CAN, FluidRegistry.WATER);
        ItemStack waxCapsuleWater = fluidItems.getContainer(EnumContainerType.CAPSULE, FluidRegistry.WATER);
        ItemStack refractoryWater = fluidItems.getContainer(EnumContainerType.REFRACTORY, FluidRegistry.WATER);
        RecipeUtil.addRecipe("can_bog_earth", bogEarth, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', canWater, 'Y', OreDictUtil.SAND);
        RecipeUtil.addRecipe("capsule_bog_earth", bogEarth, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', waxCapsuleWater, 'Y', OreDictUtil.SAND);
        RecipeUtil.addRecipe("refractory_capsule_bog_earth", bogEarth, "#Y#", "YXY", "#Y#", '#', Blocks.DIRT, 'X', refractoryWater, 'Y', OreDictUtil.SAND);
    }
    // Crafting Material
    RecipeUtil.addRecipe("silk_to_string", new ItemStack(Items.STRING), "#", "#", "#", '#', items.craftingMaterial.getSilkWisp());
    // / Pipette
    RecipeUtil.addRecipe("pipette", items.pipette, "  #", " X ", "X  ", 'X', OreDictUtil.PANE_GLASS, '#', new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE));
    // Storage Blocks
    {
        RecipeUtil.addRecipe("apatite_block", blocks.resourceStorageApatite, "###", "###", "###", '#', OreDictUtil.GEM_APATITE);
        RecipeUtil.addShapelessRecipe("block_to_apatite", new ItemStack(items.apatite, 9), OreDictUtil.BLOCK_APATITE);
    }
    {
        RecipeUtil.addRecipe("copper_block", blocks.resourceStorageCopper, "###", "###", "###", '#', OreDictUtil.INGOT_COPPER);
        ItemStack ingotCopper = items.ingotCopper.copy();
        ingotCopper.setCount(9);
        RecipeUtil.addShapelessRecipe("block_to_copper", ingotCopper, OreDictUtil.BLOCK_COPPER);
    }
    {
        RecipeUtil.addRecipe("tin_block", blocks.resourceStorageTin, "###", "###", "###", '#', OreDictUtil.INGOT_TIN);
        ItemStack ingotTin = items.ingotTin.copy();
        ingotTin.setCount(9);
        RecipeUtil.addShapelessRecipe("block_to_tin", ingotTin, OreDictUtil.BLOCK_TIN);
    }
    {
        RecipeUtil.addRecipe("bronze_block", blocks.resourceStorageBronze, "###", "###", "###", '#', OreDictUtil.INGOT_BRONZE);
        ItemStack ingotBronze = items.ingotBronze.copy();
        ingotBronze.setCount(9);
        RecipeUtil.addShapelessRecipe("block_to_bronze", ingotBronze, OreDictUtil.BLOCK_BRONZE);
    }
    if (!ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.ARBORICULTURE))) {
        RecipeUtil.addSmelting(new ItemStack(items.ash, 2), new ItemStack(Items.COAL, 1, 1), 0.15F);
    }
    RecipeUtil.addRecipe("ash_brick", blocks.ashBrick, "A#A", "# #", "A#A", '#', Items.BRICK, 'A', OreDictUtil.DUST_ASH);
    RecipeUtil.addRecipe("ash_stairs", blocks.ashStairs, true, "#  ", "## ", "###", '#', Items.BRICK);
    // alternate recipes
    if (!ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
        RecipeManagers.centrifugeManager.addRecipe(5, new ItemStack(Items.STRING), ImmutableMap.of(items.craftingMaterial.getSilkWisp(), 0.15f));
    }
}
Also used : BlockRegistryCore(forestry.core.blocks.BlockRegistryCore) ItemRegistryCore(forestry.core.items.ItemRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.util.ResourceLocation) ItemRegistryFluids(forestry.core.items.ItemRegistryFluids) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemRegistryCore (forestry.core.items.ItemRegistryCore)3 ItemRegistryFluids (forestry.core.items.ItemRegistryFluids)3 ItemStack (net.minecraft.item.ItemStack)3 ResourceLocation (net.minecraft.util.ResourceLocation)3 FluidStack (net.minecraftforge.fluids.FluidStack)3 ItemRegistryApiculture (forestry.apiculture.items.ItemRegistryApiculture)2 BlockRegistryCore (forestry.core.blocks.BlockRegistryCore)2 ICircuitLayout (forestry.api.circuits.ICircuitLayout)1 BlockHoneyComb (forestry.apiculture.blocks.BlockHoneyComb)1 BlockRegistryApiculture (forestry.apiculture.blocks.BlockRegistryApiculture)1 ItemElectronTube (forestry.core.items.ItemElectronTube)1 BlockRegistryFactory (forestry.factory.blocks.BlockRegistryFactory)1 ItemRegistryFood (forestry.food.items.ItemRegistryFood)1