Search in sources :

Example 6 with ItemRegistryCore

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

the class ModuleMail method registerRecipes.

@Override
public void registerRecipes() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    ItemRegistryMail items = getItems();
    BlockRegistryMail blocks = getBlocks();
    ItemStack stampGlue;
    ItemStack letterGlue;
    if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
        ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
        stampGlue = beeItems.honeyDrop.getItemStack();
        letterGlue = beeItems.propolis.getWildcard();
    } else {
        stampGlue = new ItemStack(Items.SLIME_BALL);
        letterGlue = new ItemStack(Items.SLIME_BALL);
    }
    RecipeUtil.addShapelessRecipe("letter", items.letters.getItemStack(), Items.PAPER, letterGlue);
    if (Config.craftingStampsEnabled) {
        for (EnumStampDefinition stampDefinition : EnumStampDefinition.VALUES) {
            if (Config.collectorStamps.contains(stampDefinition.getUid())) {
                continue;
            }
            ItemStack stamps = items.stamps.get(stampDefinition, 9);
            RecipeUtil.addRecipe("stamps", stamps, "XXX", "###", "ZZZ", 'X', stampDefinition.getCraftingIngredient(), '#', Items.PAPER, 'Z', stampGlue);
            RecipeManagers.carpenterManager.addRecipe(10, Fluids.SEED_OIL.getFluid(300), ItemStack.EMPTY, stamps, "XXX", "###", 'X', stampDefinition.getCraftingIngredient(), '#', Items.PAPER);
        }
    }
    // Recycling
    RecipeUtil.addRecipe("letter_recycling", new ItemStack(Items.PAPER), "###", '#', OreDictUtil.EMPTIED_LETTER_ORE_DICT);
    // Carpenter
    RecipeManagers.carpenterManager.addRecipe(10, new FluidStack(FluidRegistry.WATER, 250), ItemStack.EMPTY, items.letters.getItemStack(), "###", "###", '#', coreItems.woodPulp);
    RecipeUtil.addShapelessRecipe("catalogue", items.catalogue.getItemStack(), items.stamps.getWildcard(), new ItemStack(Items.BOOK));
    RecipeUtil.addRecipe("mailbox", new ItemStack(blocks.mailbox), " # ", "#Y#", "XXX", '#', "ingotTin", 'X', "chestWood", 'Y', coreItems.sturdyCasing);
    RecipeUtil.addRecipe("trade_station", new ItemStack(blocks.tradeStation), "Z#Z", "#Y#", "XWX", '#', coreItems.tubes.get(EnumElectronTube.BRONZE, 1), 'X', "chestWood", 'Y', coreItems.sturdyCasing, 'Z', coreItems.tubes.get(EnumElectronTube.IRON, 1), 'W', ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.REFINED, null, new ICircuit[] {}));
}
Also used : BlockRegistryMail(forestry.mail.blocks.BlockRegistryMail) ItemRegistryCore(forestry.core.items.ItemRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.util.ResourceLocation) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) ItemRegistryMail(forestry.mail.items.ItemRegistryMail) ICircuit(forestry.api.circuits.ICircuit) EnumStampDefinition(forestry.mail.items.EnumStampDefinition) ItemStack(net.minecraft.item.ItemStack)

Example 7 with ItemRegistryCore

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

the class ModuleCore method registerItemsAndBlocks.

@Override
public void registerItemsAndBlocks() {
    items = new ItemRegistryCore();
    blocks = new BlockRegistryCore();
}
Also used : BlockRegistryCore(forestry.core.blocks.BlockRegistryCore) ItemRegistryCore(forestry.core.items.ItemRegistryCore)

Example 8 with ItemRegistryCore

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

the class ModuleFluids method doInit.

@Override
public void doInit() {
    if (RecipeManagers.squeezerManager != null) {
        ItemRegistryCore itemRegistryCore = ModuleCore.getItems();
        RecipeManagers.squeezerManager.addContainerRecipe(10, getItems().canEmpty.getItemStack(), itemRegistryCore.ingotTin.copy(), 0.05f);
        RecipeManagers.squeezerManager.addContainerRecipe(10, getItems().waxCapsuleEmpty.getItemStack(), itemRegistryCore.beeswax.getItemStack(), 0.10f);
        RecipeManagers.squeezerManager.addContainerRecipe(10, getItems().refractoryEmpty.getItemStack(), itemRegistryCore.refractoryWax.getItemStack(), 0.10f);
    }
    FluidStack ethanol = Fluids.BIO_ETHANOL.getFluid(1);
    GeneratorFuel ethanolFuel = new GeneratorFuel(ethanol, (int) (32 * ForestryAPI.activeMode.getFloatSetting("fuel.ethanol.generator")), 4);
    FuelManager.generatorFuel.put(ethanol.getFluid(), ethanolFuel);
    FluidStack biomass = Fluids.BIOMASS.getFluid(1);
    GeneratorFuel biomassFuel = new GeneratorFuel(biomass, (int) (8 * ForestryAPI.activeMode.getFloatSetting("fuel.biomass.generator")), 1);
    FuelManager.generatorFuel.put(biomass.getFluid(), biomassFuel);
}
Also used : GeneratorFuel(forestry.api.fuels.GeneratorFuel) ItemRegistryCore(forestry.core.items.ItemRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack)

Example 9 with ItemRegistryCore

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

the class ModuleGreenhouse method registerRecipes.

@Override
public void registerRecipes() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    BlockRegistryGreenhouse blocks = getBlocks();
    ItemRegistryGreenhouse items = getItems();
    // / CAMOUFLAGE SPRAY CAN
    RecipeUtil.addRecipe("camouflage_spray_can", items.camouflageSprayCan, "TTT", "TCT", "TCT", 'T', OreDictUtil.INGOT_TIN, 'C', coreItems.craftingMaterial.getCamouflagedPaneling());
    ItemStack greenhousePlainBlock = new ItemStack(blocks.greenhouseBlock, 2, BlockGreenhouseType.PLAIN.ordinal());
    RecipeUtil.addRecipe("greenhouse_plain", greenhousePlainBlock.copy(), "#X#", "SIS", 'I', OreDictUtil.INGOT_IRON, 'S', OreDictUtil.SLAB_WOOD, 'X', GreenhouseController.createDefaultCamouflageBlock(), '#', coreItems.craftingMaterial.getCamouflagedPaneling());
    greenhousePlainBlock.setCount(1);
    RecipeUtil.addRecipe("greenhouse_control", new ItemStack(blocks.greenhouseBlock, 1, BlockGreenhouseType.CONTROL.ordinal()), " X ", "#T#", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.DUST_REDSTONE, 'T', coreItems.tubes.get(EnumElectronTube.GOLD, 1));
    RecipeUtil.addRecipe("greenhouse_gearbox", new ItemStack(blocks.greenhouseBlock, 1, BlockGreenhouseType.GEARBOX.ordinal()), " X ", "###", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.GEAR_TIN);
    RecipeUtil.addRecipe("greenhouse_hygro", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HYGRO.ordinal()), "GIG", "GXG", "GIG", 'X', greenhousePlainBlock.copy(), 'I', OreDictUtil.INGOT_IRON, 'G', OreDictUtil.BLOCK_GLASS);
    RecipeUtil.addRecipe("greenhouse_heater", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HEATER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.GOLD, 1));
    RecipeUtil.addRecipe("greenhouse_fan", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.FAN.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_IRON, 'T', coreItems.tubes.get(EnumElectronTube.TIN, 1));
    RecipeUtil.addRecipe("greenhouse_dehumidifier", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.DEHUMIDIFIER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.BLAZE, 1));
    RecipeUtil.addRecipe("greenhouse_humidifier", new ItemStack(blocks.climatiserBlock, 1, BlockClimatiserType.HUMIDIFIER.ordinal()), "T#T", "#X#", "T#T", 'X', greenhousePlainBlock.copy(), '#', OreDictUtil.INGOT_TIN, 'T', coreItems.tubes.get(EnumElectronTube.LAPIS, 1));
    for (String glassName : GreenhouseManager.helper.getWindowGlasses()) {
        ItemStack glassItem = GreenhouseManager.helper.getGlassItem(glassName);
        ItemStack window = blocks.window.getItem(glassName);
        ItemStack roodWindow = blocks.roofWindow.getItem(glassName);
        RecipeUtil.addRecipe("greenhouse_window_" + glassName, roodWindow, true, "SGS", "GGG", "GGG", 'G', glassItem, 'S', OreDictUtil.STICK_WOOD);
        RecipeUtil.addRecipe("greenhouse_window_roof_" + glassName, window, true, "SGG", "GGG", "SGG", 'G', glassItem, 'S', OreDictUtil.STICK_WOOD);
    }
    ICircuitLayout layout = ChipsetManager.circuitRegistry.getLayout("forestry.greenhouse.climatiser");
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.GOLD, 1), Circuits.climatiserTemperature1);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.BLAZE, 1), Circuits.climatiserTemperature2);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.LAPIS, 1), Circuits.climatiserHumidity1);
    ChipsetManager.solderManager.addRecipe(layout, coreItems.tubes.get(EnumElectronTube.OBSIDIAN, 1), Circuits.climatiserHumidity2);
}
Also used : ItemRegistryGreenhouse(forestry.greenhouse.items.ItemRegistryGreenhouse) ICircuitLayout(forestry.api.circuits.ICircuitLayout) ItemRegistryCore(forestry.core.items.ItemRegistryCore) BlockRegistryGreenhouse(forestry.greenhouse.blocks.BlockRegistryGreenhouse) ItemStack(net.minecraft.item.ItemStack)

Example 10 with ItemRegistryCore

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

the class ModuleApiculture method registerCrates.

@Override
public void registerCrates() {
    ItemRegistryCore coreItems = ModuleCore.getItems();
    ItemRegistryApiculture items = getItems();
    ICrateRegistry crateRegistry = StorageManager.crateRegistry;
    crateRegistry.registerCrate(coreItems.beeswax.getItemStack());
    crateRegistry.registerCrate(items.pollenCluster.get(EnumPollenCluster.NORMAL, 1));
    crateRegistry.registerCrate(items.pollenCluster.get(EnumPollenCluster.CRYSTALLINE, 1));
    crateRegistry.registerCrate(items.propolis.getItemStack());
    crateRegistry.registerCrate(items.honeydew.getItemStack());
    crateRegistry.registerCrate(items.royalJelly.getItemStack());
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.HONEY, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.COCOA, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.SIMMERING, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.STRINGY, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.FROZEN, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.DRIPPING, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.SILKY, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.PARCHED, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.POWDERY, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.WHEATEN, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.MOSSY, 1));
    crateRegistry.registerCrate(items.beeComb.get(EnumHoneyComb.MELLOW, 1));
    crateRegistry.registerCrate(coreItems.refractoryWax.getItemStack());
}
Also used : ItemRegistryCore(forestry.core.items.ItemRegistryCore) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) ICrateRegistry(forestry.api.storage.ICrateRegistry)

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