Search in sources :

Example 1 with RecipeUtil

use of binnie.core.util.RecipeUtil in project Binnie by ForestryMC.

the class ManagerLiquid method postInit.

@Override
public void postInit() {
    RecipeUtil recipeUtil = new RecipeUtil(Constants.CORE_MOD_ID);
    recipeUtil.addShapelessRecipe("glass_container_conversion", FluidContainerType.GLASS.get(1), Items.GLASS_BOTTLE);
    recipeUtil.addShapelessRecipe("glass_bottle_conversion", new ItemStack(Items.GLASS_BOTTLE), FluidContainerType.GLASS.get(1));
    recipeUtil.addRecipe("glass_container", FluidContainerType.GLASS.get(3), " b ", "g g", " g ", 'g', OreDictUtil.BLOCK_GLASS, 'b', OreDictUtil.SLAB_WOOD);
}
Also used : ItemStack(net.minecraft.item.ItemStack) RecipeUtil(binnie.core.util.RecipeUtil)

Example 2 with RecipeUtil

use of binnie.core.util.RecipeUtil in project Binnie by ForestryMC.

the class ModuleItems method postInit.

@Override
public void postInit() {
    RecipeUtil recipeUtil = new RecipeUtil(Constants.CORE_MOD_ID);
    recipeUtil.addRecipe("field_kit", new ItemStack(BinnieCore.getFieldKit(), 1, 63), "g  ", " is", " pi", 'g', Blocks.GLASS_PANE, 'i', Items.IRON_INGOT, 'p', Items.PAPER, 's', new ItemStack(Items.DYE, 1));
}
Also used : ItemStack(net.minecraft.item.ItemStack) RecipeUtil(binnie.core.util.RecipeUtil)

Example 3 with RecipeUtil

use of binnie.core.util.RecipeUtil in project Binnie by ForestryMC.

the class ModuleWood method doInit.

@Override
public void doInit() {
    AlleleETFruitDefinition.init();
    ETTreeDefinition.initTrees();
    ExtraTreeMutation.init();
    if (BinnieCore.isLepidopteryActive()) {
        ButterflySpecies.initButterflies();
    }
    RecipeUtil recipeUtil = new RecipeUtil(Constants.EXTRA_TREES_MOD_ID);
    for (BlockETLog log : logs) {
        ItemStack logInput = new ItemStack(log, 1, OreDictionary.WILDCARD_VALUE);
        ItemStack coalOutput = new ItemStack(Items.COAL, 1, 1);
        GameRegistry.addSmelting(logInput, coalOutput, 0.15F);
    }
    IWoodAccess woodAccess = TreeManager.woodAccess;
    for (EnumETLog log : EnumETLog.VALUES) {
        ItemStack logs = woodAccess.getStack(log, WoodBlockKind.LOG, false);
        ItemStack planks = log.getPlank().getStack(false);
        ItemStack fireproofLogs = woodAccess.getStack(log, WoodBlockKind.LOG, true);
        ItemStack fireproofPlanks = log.getPlank().getStack(true);
        planks.setCount(4);
        recipeUtil.addShapelessRecipe(log.getUid() + "_planks", planks.copy(), logs.copy());
        fireproofPlanks.setCount(4);
        recipeUtil.addShapelessRecipe(log.getUid() + "_fireproof_planks", fireproofPlanks.copy(), fireproofLogs);
        if (ModuleUtils.isModuleActive(ForestryModuleUids.FACTORY, ForestryModuleUids.APICULTURE)) {
            logs.setCount(1);
            fireproofLogs.setCount(1);
            RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), fireproofLogs.copy(), new Object[] { " # ", "#X#", " # ", '#', Mods.Forestry.item("refractory_wax"), 'X', logs.copy() });
        }
    }
    for (ExtraTreePlanks plankType : ExtraTreePlanks.VALUES) {
        for (boolean fireproof : new boolean[] { false, true }) {
            ItemStack planks = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.PLANKS, fireproof);
            ItemStack slabs = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.SLAB, fireproof);
            ItemStack fences = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.FENCE, fireproof);
            ItemStack fenceGates = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.FENCE_GATE, fireproof);
            ItemStack stairs = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.STAIRS, fireproof);
            String plankUid = plankType.getWoodType().getUid();
            if (fireproof) {
                plankUid += "_fireproof";
            }
            stairs.setCount(4);
            recipeUtil.addRecipe(plankUid + "_stairs", stairs.copy(), "#  ", "## ", "###", '#', planks.copy());
            slabs.setCount(6);
            recipeUtil.addRecipe(plankUid + "_slabs", slabs.copy(), "###", '#', planks.copy());
            fences.setCount(3);
            planks.setCount(1);
            recipeUtil.addRecipe(plankUid + "_fences", fences.copy(), "#X#", "#X#", '#', planks.copy(), 'X', "stickWood");
            fenceGates.setCount(1);
            planks.setCount(1);
            recipeUtil.addRecipe(plankUid + "_fence_gates", fenceGates.copy(), "X#X", "X#X", '#', planks.copy(), 'X', "stickWood");
            if (!fireproof) {
                ItemStack doors = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.DOOR, false);
                doors.setCount(3);
                planks.setCount(1);
                recipeUtil.addRecipe(plankUid + "_doors", doors.copy(), "## ", "## ", "## ", '#', planks.copy());
            }
        }
        // Fabricator recipes
        if (ModuleUtils.isModuleActive(ForestryModuleUids.FACTORY, ForestryModuleUids.APICULTURE)) {
            ItemStack planks = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.PLANKS, false);
            ItemStack fireproofPlanks = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.PLANKS, true);
            planks.setCount(1);
            fireproofPlanks.setCount(5);
            RecipeManagers.fabricatorManager.addRecipe(ItemStack.EMPTY, Fluids.GLASS.getFluid(500), fireproofPlanks.copy(), new Object[] { "X#X", "#X#", "X#X", '#', Mods.Forestry.item("refractory_wax"), 'X', planks.copy() });
        }
    }
    ForgeRegistries.RECIPES.register(new MultiFenceRecipeSize());
    ForgeRegistries.RECIPES.register(new MultiFenceRecipeEmbedded());
    ForgeRegistries.RECIPES.register(new MultiFenceRecipeSolid());
    this.addSqueezer(EnumVanillaWoodType.SPRUCE, ExtraTreeLiquid.Resin, 50);
}
Also used : ExtraTreePlanks(binnie.extratrees.wood.planks.ExtraTreePlanks) EnumETLog(binnie.extratrees.wood.EnumETLog) MultiFenceRecipeEmbedded(binnie.extratrees.blocks.decor.MultiFenceRecipeEmbedded) BlockETLog(binnie.extratrees.blocks.wood.BlockETLog) MultiFenceRecipeSize(binnie.extratrees.blocks.decor.MultiFenceRecipeSize) ItemStack(net.minecraft.item.ItemStack) IWoodAccess(forestry.api.arboriculture.IWoodAccess) MultiFenceRecipeSolid(binnie.extratrees.blocks.decor.MultiFenceRecipeSolid) RecipeUtil(binnie.core.util.RecipeUtil)

Example 4 with RecipeUtil

use of binnie.core.util.RecipeUtil in project Binnie by ForestryMC.

the class ModuleFarming method doInit.

@Override
public void doInit() {
    ItemStack yellow = new ItemStack(Blocks.YELLOW_FLOWER, 1);
    ItemStack red = new ItemStack(Blocks.RED_FLOWER, 1);
    ItemStack blue = new ItemStack(Blocks.RED_FLOWER, 1, 7);
    for (boolean manual : new boolean[] { true, false }) {
        for (boolean fertilised : new boolean[] { true, false }) {
            for (EnumMoisture moist : EnumMoisture.values()) {
                ItemStack icon;
                if (moist == EnumMoisture.DRY) {
                    icon = yellow;
                } else if (moist == EnumMoisture.NORMAL) {
                    icon = red;
                } else {
                    icon = blue;
                }
                int insulate = 2 - moist.ordinal();
                if (fertilised) {
                    insulate += 3;
                }
                new CircuitGarden(moist, null, manual, fertilised, new ItemStack(insulatedTube, 1, 128 * insulate), icon);
                new CircuitGarden(moist, EnumAcidity.ACID, manual, fertilised, new ItemStack(insulatedTube, 1, 1 + 128 * insulate), icon);
                new CircuitGarden(moist, EnumAcidity.NEUTRAL, manual, fertilised, new ItemStack(insulatedTube, 1, 2 + 128 * insulate), icon);
                new CircuitGarden(moist, EnumAcidity.ALKALINE, manual, fertilised, new ItemStack(insulatedTube, 1, 3 + 128 * insulate), icon);
            }
        }
    }
    for (EnumTubeMaterial mat : EnumTubeMaterial.VALUES) {
        RecipeUtil recipeUtil = new RecipeUtil(Constants.BOTANY_MOD_ID);
        for (EnumTubeInsulate insulate : EnumTubeInsulate.VALUES) {
            ItemStack tubes = new ItemStack(insulatedTube, 2, mat.ordinal() + 128 * insulate.ordinal());
            ItemStack insulateStack = ItemInsulatedTube.getInsulateStack(tubes);
            ItemStack forestryTube = new ItemStack(Mods.Forestry.item("thermionic_tubes"), 1, mat.ordinal());
            String recipeName = "thermionic_tubes_" + insulate.getUid() + '_' + mat.getUid();
            recipeUtil.addShapelessRecipe(recipeName, tubes, forestryTube, forestryTube, insulateStack);
        }
    }
}
Also used : EnumMoisture(binnie.botany.api.gardening.EnumMoisture) CircuitGarden(binnie.botany.farming.CircuitGarden) EnumTubeInsulate(binnie.botany.items.EnumTubeInsulate) EnumTubeMaterial(binnie.botany.items.EnumTubeMaterial) ItemStack(net.minecraft.item.ItemStack) RecipeUtil(binnie.core.util.RecipeUtil)

Example 5 with RecipeUtil

use of binnie.core.util.RecipeUtil in project Binnie by ForestryMC.

the class ModuleGardening method doInit.

@Override
public void doInit() {
    RecipeUtil recipeUtil = new RecipeUtil(Constants.BOTANY_MOD_ID);
    IGardeningManager gardening = BotanyCore.getGardening();
    recipeUtil.addRecipe("trowel_wood", trowelWood, "d  ", " x ", "  s", 'd', Blocks.DIRT, 's', "stickWood", 'x', "plankWood");
    recipeUtil.addRecipe("trowel_stone", trowelStone, "d  ", " x ", "  s", 'd', Blocks.DIRT, 's', "stickWood", 'x', "cobblestone");
    recipeUtil.addRecipe("trowel_iron", trowelIron, "d  ", " x ", "  s", 'd', Blocks.DIRT, 's', "stickWood", 'x', "ingotIron");
    recipeUtil.addRecipe("trowel_gold", trowelGold, "d  ", " x ", "  s", 'd', Blocks.DIRT, 's', "stickWood", 'x', "ingotGold");
    recipeUtil.addRecipe("trowel_diamond", trowelDiamond, "d  ", " x ", "  s", 'd', Blocks.DIRT, 's', "stickWood", 'x', "gemDiamond");
    recipeUtil.addRecipe("soil_meter", soilMeter, " gg", " rg", "i  ", 'g', "ingotGold", 'r', "dustRedstone", 'i', "ingotIron");
    recipeUtil.addShapelessRecipe("weed_killer", BotanyItems.WEEDKILLER.get(4), new ItemStack(Items.SPIDER_EYE), new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.WHEAT_SEEDS), new ItemStack(Items.WHEAT_SEEDS));
    recipeUtil.addShapelessRecipe("powder_ash", BotanyItems.POWDER_ASH.get(4), Mods.Forestry.stack("ash"));
    recipeUtil.addShapelessRecipe("powder_mulch", BotanyItems.POWDER_MULCH.get(4), Mods.Forestry.stack("mulch"));
    recipeUtil.addShapelessRecipe("powder_compost", BotanyItems.POWDER_COMPOST.get(4), Mods.Forestry.stack("fertilizer_bio"));
    recipeUtil.addShapelessRecipe("powder_fertilizer", BotanyItems.POWDER_FERTILISER.get(4), Mods.Forestry.stack("fertilizer_compound"));
    recipeUtil.addShapelessRecipe("powder_pulp", BotanyItems.POWDER_PULP.get(4), Mods.Forestry.stack("wood_pulp"));
    recipeUtil.addShapelessRecipe("pigment_black", BotanyItems.POWDER_SULPHUR.get(4), "dustSulphur");
    gardening.registerFertiliser(EnumFertiliserType.ACID, BotanyItems.POWDER_SULPHUR.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.ACID, BotanyItems.POWDER_MULCH.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.ACID, Mods.Forestry.stack("mulch"), 2);
    for (ItemStack stack : OreDictionary.getOres("dustSulfur")) {
        gardening.registerFertiliser(EnumFertiliserType.ACID, stack, 2);
    }
    gardening.registerFertiliser(EnumFertiliserType.ALKALINE, BotanyItems.POWDER_ASH.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.ALKALINE, BotanyItems.POWDER_PULP.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.ALKALINE, Mods.Forestry.stack("ash"), 2);
    gardening.registerFertiliser(EnumFertiliserType.ALKALINE, Mods.Forestry.stack("wood_pulp"), 2);
    gardening.registerFertiliser(EnumFertiliserType.NUTRIENT, BotanyItems.POWDER_COMPOST.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.NUTRIENT, BotanyItems.POWDER_FERTILISER.get(1), 1);
    gardening.registerFertiliser(EnumFertiliserType.NUTRIENT, Mods.Forestry.stack("fertilizer_bio"), 2);
    gardening.registerFertiliser(EnumFertiliserType.NUTRIENT, Mods.Forestry.stack("fertilizer_compound"), 2);
    addFertiliserRecipes(recipeUtil);
}
Also used : ItemStack(net.minecraft.item.ItemStack) IGardeningManager(binnie.botany.api.gardening.IGardeningManager) RecipeUtil(binnie.core.util.RecipeUtil)

Aggregations

RecipeUtil (binnie.core.util.RecipeUtil)13 ItemStack (net.minecraft.item.ItemStack)9 Item (net.minecraft.item.Item)3 EnumMoisture (binnie.botany.api.gardening.EnumMoisture)1 IGardeningManager (binnie.botany.api.gardening.IGardeningManager)1 EnumFlowerColor (binnie.botany.api.genetics.EnumFlowerColor)1 CircuitGarden (binnie.botany.farming.CircuitGarden)1 EnumTubeInsulate (binnie.botany.items.EnumTubeInsulate)1 EnumTubeMaterial (binnie.botany.items.EnumTubeMaterial)1 CeramicTileRecipe (binnie.botany.recipes.CeramicTileRecipe)1 PigmentRecipe (binnie.botany.recipes.PigmentRecipe)1 MultiFenceRecipeEmbedded (binnie.extratrees.blocks.decor.MultiFenceRecipeEmbedded)1 MultiFenceRecipeSize (binnie.extratrees.blocks.decor.MultiFenceRecipeSize)1 MultiFenceRecipeSolid (binnie.extratrees.blocks.decor.MultiFenceRecipeSolid)1 BlockETLog (binnie.extratrees.blocks.wood.BlockETLog)1 VillageCreationExtraTrees (binnie.extratrees.village.VillageCreationExtraTrees)1 EnumETLog (binnie.extratrees.wood.EnumETLog)1 ExtraTreePlanks (binnie.extratrees.wood.planks.ExtraTreePlanks)1 RegistryRecipe (binnie.genetics.recipes.RegistryRecipe)1 IWoodAccess (forestry.api.arboriculture.IWoodAccess)1