Search in sources :

Example 1 with ItemElectronTube

use of forestry.core.items.ItemElectronTube 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)

Aggregations

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