Search in sources :

Example 11 with ItemRegistryCore

use of forestry.core.items.ItemRegistryCore 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 12 with ItemRegistryCore

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

the class ModuleFarming method preInit.

@Override
public void preInit() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    BlockRegistryFarming blocks = getBlocks();
    MinecraftForge.EVENT_BUS.register(this);
    IFarmRegistry registry = ForestryAPI.farmRegistry;
    registry.registerFarmables("farmArboreal", new FarmableVanillaSapling());
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.ARBORICULTURE))) {
        registry.registerFarmables("farmArboreal", new FarmableGE());
    }
    registry.registerFarmables("farmCrops", new FarmableAgingCrop(new ItemStack(Items.WHEAT_SEEDS), Blocks.WHEAT, BlockCrops.AGE, 7, 0), new FarmableAgingCrop(new ItemStack(Items.POTATO), Blocks.POTATOES, BlockCrops.AGE, 7, 0), new FarmableAgingCrop(new ItemStack(Items.CARROT), Blocks.CARROTS, BlockCrops.AGE, 7, 0), new FarmableAgingCrop(new ItemStack(Items.BEETROOT_SEEDS), Blocks.BEETROOTS, BlockBeetroot.BEETROOT_AGE, 3, 0));
    IBlockState plantedBrownMushroom = blocks.mushroom.getDefaultState().withProperty(BlockMushroom.VARIANT, BlockMushroom.MushroomType.BROWN);
    registry.registerFarmables("farmShroom", new FarmableVanillaMushroom(new ItemStack(Blocks.BROWN_MUSHROOM), plantedBrownMushroom, Blocks.BROWN_MUSHROOM_BLOCK));
    IBlockState plantedRedMushroom = blocks.mushroom.getDefaultState().withProperty(BlockMushroom.VARIANT, BlockMushroom.MushroomType.RED);
    registry.registerFarmables("farmShroom", new FarmableVanillaMushroom(new ItemStack(Blocks.RED_MUSHROOM), plantedRedMushroom, Blocks.RED_MUSHROOM_BLOCK));
    registry.registerFarmables("farmGourd", new FarmableGourd(new ItemStack(Items.PUMPKIN_SEEDS), Blocks.PUMPKIN_STEM, Blocks.PUMPKIN));
    registry.registerFarmables("farmGourd", new FarmableGourd(new ItemStack(Items.MELON_SEEDS), Blocks.MELON_STEM, Blocks.MELON_BLOCK));
    registry.registerFarmables("farmInfernal", new FarmableAgingCrop(new ItemStack(Items.NETHER_WART), Blocks.NETHER_WART, BlockNetherWart.AGE, 3));
    registry.registerFarmables("farmPoales", new FarmableStacked(new ItemStack(Items.REEDS), Blocks.REEDS, 3));
    registry.registerFarmables("farmSucculentes", new FarmableStacked(new ItemStack(Blocks.CACTUS), Blocks.CACTUS, 3));
    registry.registerFarmables("farmEnder", FarmableChorus.INSTANCE);
    // Forestry fertilizer
    registry.registerFertilizer(new ItemStack(coreItems.fertilizerCompound, 1, OreDictionary.WILDCARD_VALUE), 500);
    proxy.initializeModels();
    // Layouts
    ICircuitLayout layoutManaged = new CircuitLayout("farms.managed", CircuitSocketType.FARM);
    ChipsetManager.circuitRegistry.registerLayout(layoutManaged);
    ICircuitLayout layoutManual = new CircuitLayout("farms.manual", CircuitSocketType.FARM);
    ChipsetManager.circuitRegistry.registerLayout(layoutManual);
}
Also used : BlockRegistryFarming(forestry.farming.blocks.BlockRegistryFarming) FarmableGE(forestry.farming.logic.farmables.FarmableGE) IBlockState(net.minecraft.block.state.IBlockState) FarmableVanillaSapling(forestry.farming.logic.farmables.FarmableVanillaSapling) ICircuitLayout(forestry.api.circuits.ICircuitLayout) CircuitLayout(forestry.core.circuits.CircuitLayout) FarmableStacked(forestry.farming.logic.farmables.FarmableStacked) FarmableVanillaMushroom(forestry.farming.logic.farmables.FarmableVanillaMushroom) ICircuitLayout(forestry.api.circuits.ICircuitLayout) ItemRegistryCore(forestry.core.items.ItemRegistryCore) ResourceLocation(net.minecraft.util.ResourceLocation) FarmableGourd(forestry.farming.logic.farmables.FarmableGourd) IFarmRegistry(forestry.api.farming.IFarmRegistry) FarmableAgingCrop(forestry.farming.logic.farmables.FarmableAgingCrop) ItemStack(net.minecraft.item.ItemStack)

Example 13 with ItemRegistryCore

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

the class ModuleFarming method registerRecipes.

@Override
public void registerRecipes() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    BlockRegistryFarming blocks = getBlocks();
    ItemStack basic = blocks.farm.get(EnumFarmBlockType.PLAIN, 1);
    ItemStack gearbox = blocks.farm.get(EnumFarmBlockType.GEARBOX, 1);
    ItemStack hatch = blocks.farm.get(EnumFarmBlockType.HATCH, 1);
    ItemStack valve = blocks.farm.get(EnumFarmBlockType.VALVE, 1);
    ItemStack control = blocks.farm.get(EnumFarmBlockType.CONTROL, 1);
    for (EnumFarmBlockTexture block : EnumFarmBlockTexture.values()) {
        NBTTagCompound compound = new NBTTagCompound();
        block.saveToCompound(compound);
        basic.setTagCompound(compound);
        gearbox.setTagCompound(compound);
        hatch.setTagCompound(compound);
        valve.setTagCompound(compound);
        control.setTagCompound(compound);
        RecipeUtil.addRecipe("farm_basic_" + block.getUid(), basic, "I#I", "WCW", '#', block.getBase(), 'W', "slabWood", 'C', coreItems.tubes.get(EnumElectronTube.TIN, 1), 'I', "ingotCopper");
        RecipeUtil.addRecipe("farm_gearbox_" + block.getUid(), gearbox, " # ", "TTT", '#', basic, 'T', "gearTin");
        RecipeUtil.addRecipe("farm_hatch_" + block.getUid(), hatch, " # ", "TDT", '#', basic, 'T', "gearTin", 'D', OreDictUtil.TRAPDOOR_WOOD);
        RecipeUtil.addRecipe("farm_valve_" + block.getUid(), valve, " # ", "XTX", '#', basic, 'T', "gearTin", 'X', "blockGlass");
        RecipeUtil.addRecipe("farm_control_" + block.getUid(), control, " # ", "XTX", '#', basic, 'T', coreItems.tubes.get(EnumElectronTube.GOLD, 1), 'X', "dustRedstone");
    }
    // Circuits
    ICircuitLayout layoutManaged = ChipsetManager.circuitRegistry.getLayout("forestry.farms.managed");
    ICircuitLayout layoutManual = ChipsetManager.circuitRegistry.getLayout("forestry.farms.manual");
    ChipsetManager.circuitRegistry.registerDeprecatedCircuitReplacement("managedCereal", Circuits.farmCropsManaged);
    ChipsetManager.circuitRegistry.registerDeprecatedCircuitReplacement("manualCereal", Circuits.farmCropsManual);
    ChipsetManager.circuitRegistry.registerDeprecatedCircuitReplacement("managedVegetable", Circuits.farmCropsManaged);
    ChipsetManager.circuitRegistry.registerDeprecatedCircuitReplacement("manualVegetable", Circuits.farmCropsManual);
    if (layoutManaged == null || layoutManual == null) {
        return;
    }
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.farmArborealManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.COPPER, 1), Circuits.farmSucculentManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.farmPeatManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.BRONZE, 1), Circuits.farmCropsManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.farmInfernalManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.TIN, 1), Circuits.farmPoalesManual);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.farmGourdManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.APATITE, 1), Circuits.farmShroomManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.DIAMOND, 1), Circuits.farmCocoaManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.EMERALD, 1), Circuits.farmOrchardManaged);
    ChipsetManager.solderManager.addRecipe(layoutManaged, coreItems.tubes.get(EnumElectronTube.ENDER, 1), Circuits.farmEnderManaged);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.farmArborealManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.COPPER, 1), Circuits.farmSucculentManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.farmPeatManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.BRONZE, 1), Circuits.farmCropsManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.TIN, 1), Circuits.farmPoalesManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.farmGourdManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.APATITE, 1), Circuits.farmShroomManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.DIAMOND, 1), Circuits.farmCocoaManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.EMERALD, 1), Circuits.farmOrchardManual);
    ChipsetManager.solderManager.addRecipe(layoutManual, coreItems.tubes.get(EnumElectronTube.ENDER, 1), Circuits.farmEnderManual);
}
Also used : BlockRegistryFarming(forestry.farming.blocks.BlockRegistryFarming) ICircuitLayout(forestry.api.circuits.ICircuitLayout) ItemRegistryCore(forestry.core.items.ItemRegistryCore) EnumFarmBlockTexture(forestry.farming.models.EnumFarmBlockTexture) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) ItemStack(net.minecraft.item.ItemStack)

Example 14 with ItemRegistryCore

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

the class ModuleFactory method preInit.

@Override
public void preInit() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    // Set fuels and resources for the fermenter
    ItemStack fertilizerCompound = coreItems.fertilizerCompound.getItemStack();
    FuelManager.fermenterFuel.put(fertilizerCompound, new FermenterFuel(fertilizerCompound, ForestryAPI.activeMode.getIntegerSetting("fermenter.value.fertilizer"), ForestryAPI.activeMode.getIntegerSetting("fermenter.cycles.fertilizer")));
    int cyclesCompost = ForestryAPI.activeMode.getIntegerSetting("fermenter.cycles.compost");
    int valueCompost = ForestryAPI.activeMode.getIntegerSetting("fermenter.value.compost");
    ItemStack fertilizerBio = coreItems.compost.getItemStack();
    ItemStack mulch = coreItems.mulch.getItemStack();
    FuelManager.fermenterFuel.put(fertilizerBio, new FermenterFuel(fertilizerBio, valueCompost, cyclesCompost));
    FuelManager.fermenterFuel.put(mulch, new FermenterFuel(mulch, valueCompost, cyclesCompost));
    // Add moistener resources
    ItemStack wheat = new ItemStack(Items.WHEAT);
    ItemStack mouldyWheat = coreItems.mouldyWheat.getItemStack();
    ItemStack decayingWheat = coreItems.decayingWheat.getItemStack();
    FuelManager.moistenerResource.put(wheat, new MoistenerFuel(wheat, mouldyWheat, 0, 300));
    FuelManager.moistenerResource.put(mouldyWheat, new MoistenerFuel(mouldyWheat, decayingWheat, 1, 600));
    FuelManager.moistenerResource.put(decayingWheat, new MoistenerFuel(decayingWheat, mulch, 2, 900));
    // Set fuels for our own engines
    ItemStack peat = coreItems.peat.getItemStack();
    FuelManager.copperEngineFuel.put(peat, new EngineCopperFuel(peat, Constants.ENGINE_COPPER_FUEL_VALUE_PEAT, Constants.ENGINE_COPPER_CYCLE_DURATION_PEAT));
    ItemStack bituminousPeat = coreItems.bituminousPeat.getItemStack();
    FuelManager.copperEngineFuel.put(bituminousPeat, new EngineCopperFuel(bituminousPeat, Constants.ENGINE_COPPER_FUEL_VALUE_BITUMINOUS_PEAT, Constants.ENGINE_COPPER_CYCLE_DURATION_BITUMINOUS_PEAT));
    Fluid biomass = Fluids.BIOMASS.getFluid();
    if (biomass != null) {
        FuelManager.bronzeEngineFuel.put(biomass, new EngineBronzeFuel(biomass, Constants.ENGINE_FUEL_VALUE_BIOMASS, (int) (Constants.ENGINE_CYCLE_DURATION_BIOMASS * ForestryAPI.activeMode.getFloatSetting("fuel.biomass.biogas")), 1));
    }
    FuelManager.bronzeEngineFuel.put(FluidRegistry.WATER, new EngineBronzeFuel(FluidRegistry.WATER, Constants.ENGINE_FUEL_VALUE_WATER, Constants.ENGINE_CYCLE_DURATION_WATER, 3));
    Fluid milk = Fluids.MILK.getFluid();
    if (milk != null) {
        FuelManager.bronzeEngineFuel.put(milk, new EngineBronzeFuel(milk, Constants.ENGINE_FUEL_VALUE_MILK, Constants.ENGINE_CYCLE_DURATION_MILK, 3));
    }
    Fluid seedOil = Fluids.SEED_OIL.getFluid();
    if (seedOil != null) {
        FuelManager.bronzeEngineFuel.put(seedOil, new EngineBronzeFuel(seedOil, Constants.ENGINE_FUEL_VALUE_SEED_OIL, Constants.ENGINE_CYCLE_DURATION_SEED_OIL, 1));
    }
    Fluid honey = Fluids.FOR_HONEY.getFluid();
    if (honey != null) {
        FuelManager.bronzeEngineFuel.put(honey, new EngineBronzeFuel(honey, Constants.ENGINE_FUEL_VALUE_HONEY, Constants.ENGINE_CYCLE_DURATION_HONEY, 1));
    }
    Fluid juice = Fluids.JUICE.getFluid();
    if (juice != null) {
        FuelManager.bronzeEngineFuel.put(juice, new EngineBronzeFuel(juice, Constants.ENGINE_FUEL_VALUE_JUICE, Constants.ENGINE_CYCLE_DURATION_JUICE, 1));
    }
    // Set rain substrates
    ItemStack iodineCharge = coreItems.iodineCharge.getItemStack();
    ItemStack dissipationCharge = coreItems.craftingMaterial.getDissipationCharge();
    FuelManager.rainSubstrate.put(iodineCharge, new RainSubstrate(iodineCharge, Constants.RAINMAKER_RAIN_DURATION_IODINE, 0.01f));
    FuelManager.rainSubstrate.put(dissipationCharge, new RainSubstrate(dissipationCharge, 0.075f));
    ICircuitLayout layoutMachineUpgrade = new CircuitLayout("machine.upgrade", CircuitSocketType.MACHINE);
    ChipsetManager.circuitRegistry.registerLayout(layoutMachineUpgrade);
}
Also used : ICircuitLayout(forestry.api.circuits.ICircuitLayout) EngineCopperFuel(forestry.api.fuels.EngineCopperFuel) ItemRegistryCore(forestry.core.items.ItemRegistryCore) MoistenerFuel(forestry.api.fuels.MoistenerFuel) Fluid(net.minecraftforge.fluids.Fluid) FermenterFuel(forestry.api.fuels.FermenterFuel) EngineBronzeFuel(forestry.api.fuels.EngineBronzeFuel) RainSubstrate(forestry.api.fuels.RainSubstrate) ICircuitLayout(forestry.api.circuits.ICircuitLayout) CircuitLayout(forestry.core.circuits.CircuitLayout) ItemStack(net.minecraft.item.ItemStack)

Example 15 with ItemRegistryCore

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

the class ButterflyAlleles method createLoot.

public static void createLoot() {
    cocoonDefault.addLoot(new ItemStack(Items.STRING, 2), 1F);
    cocoonDefault.addLoot(new ItemStack(Items.STRING), 0.75F);
    cocoonDefault.addLoot(new ItemStack(Items.STRING, 3), 0.25F);
    ItemRegistryCore itemRegistry = ModuleCore.getItems();
    cocoonSilk.addLoot(new ItemStack(itemRegistry.craftingMaterial, 3, 2), 0.75F);
    cocoonSilk.addLoot(new ItemStack(itemRegistry.craftingMaterial, 2, 2), 0.25F);
}
Also used : ItemRegistryCore(forestry.core.items.ItemRegistryCore) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ItemRegistryCore (forestry.core.items.ItemRegistryCore)23 ItemStack (net.minecraft.item.ItemStack)18 ResourceLocation (net.minecraft.util.ResourceLocation)10 ICircuitLayout (forestry.api.circuits.ICircuitLayout)6 FluidStack (net.minecraftforge.fluids.FluidStack)6 ItemRegistryApiculture (forestry.apiculture.items.ItemRegistryApiculture)5 BlockRegistryCore (forestry.core.blocks.BlockRegistryCore)5 MoistenerFuel (forestry.api.fuels.MoistenerFuel)3 ItemRegistryFluids (forestry.core.items.ItemRegistryFluids)3 FarmableAgingCrop (forestry.farming.logic.farmables.FarmableAgingCrop)3 IFarmRegistry (forestry.api.farming.IFarmRegistry)2 EngineBronzeFuel (forestry.api.fuels.EngineBronzeFuel)2 ICrateRegistry (forestry.api.storage.ICrateRegistry)2 BlockRegistryApiculture (forestry.apiculture.blocks.BlockRegistryApiculture)2 CircuitLayout (forestry.core.circuits.CircuitLayout)2 BlockRegistryFarming (forestry.farming.blocks.BlockRegistryFarming)2 Block (net.minecraft.block.Block)2 ImmutableList (com.google.common.collect.ImmutableList)1 EnumForestryWoodType (forestry.api.arboriculture.EnumForestryWoodType)1 IWoodType (forestry.api.arboriculture.IWoodType)1