Search in sources :

Example 1 with ItemRegistryFood

use of forestry.food.items.ItemRegistryFood 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)

Aggregations

BlockHoneyComb (forestry.apiculture.blocks.BlockHoneyComb)1 BlockRegistryApiculture (forestry.apiculture.blocks.BlockRegistryApiculture)1 ItemRegistryApiculture (forestry.apiculture.items.ItemRegistryApiculture)1 ItemRegistryCore (forestry.core.items.ItemRegistryCore)1 ItemRegistryFluids (forestry.core.items.ItemRegistryFluids)1 ItemRegistryFood (forestry.food.items.ItemRegistryFood)1 ItemStack (net.minecraft.item.ItemStack)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 FluidStack (net.minecraftforge.fluids.FluidStack)1