Search in sources :

Example 1 with GenMaterial

use of com.builtbroken.mc.core.content.resources.GenMaterial in project Engine by VoltzEngine-Project.

the class CrusherRecipeLoad method generateRecipes.

@Override
protected void generateRecipes(List<MRItemStack> recipes) {
    recipes.add(newRecipe(Blocks.cobblestone).addInputOption(Blocks.stone));
    recipes.add(newRecipe(new ItemStack(Blocks.cobblestone, 4)).addInputOption(Blocks.stonebrick));
    if (DefinedGenItems.RUBBLE.item != null) {
        for (GenMaterial mat : GenMaterial.values()) {
            if (mat != GenMaterial.UNKNOWN && !DefinedGenItems.RUBBLE.ignoreMaterials.contains(mat)) {
                List<ItemStack> oreStacks = OreDictionary.getOres("ore" + LanguageUtility.capitalizeFirst(mat.name().toLowerCase()));
                if (oreStacks != null && !oreStacks.isEmpty()) {
                    for (ItemStack stack : oreStacks) {
                        if (stack != null && stack.getItem() != null) {
                            recipes.add(newRecipe(DefinedGenItems.RUBBLE.stack(mat)).addInputOption(stack));
                        }
                    }
                }
            }
        }
    }
}
Also used : GenMaterial(com.builtbroken.mc.core.content.resources.GenMaterial) ItemStack(net.minecraft.item.ItemStack) MRItemStack(com.builtbroken.mc.lib.recipe.item.MRItemStack) MRLoaderItemStack(com.builtbroken.mc.lib.recipe.item.MRLoaderItemStack)

Example 2 with GenMaterial

use of com.builtbroken.mc.core.content.resources.GenMaterial in project Engine by VoltzEngine-Project.

the class GearRecipeLoader method postInit.

@Override
public void postInit() {
    if (DefinedGenItems.GEAR.item != null) {
        if (Engine.itemSimpleCraftingTools != null) {
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.GEAR.item, 2, GenMaterial.WOOD.ordinal()), "WH", "DC", 'W', OreNames.WOOD, 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'D', Engine.itemSimpleCraftingTools.getDrill()));
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.GEAR.item, 2, GenMaterial.WOOD.ordinal()), "HS ", "SWS", " SC", 'W', OreNames.WOOD, 'S', OreNames.WOOD_STICK, 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel()));
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.GEAR.item, 1, GenMaterial.STONE.ordinal()), "WH", "DC", 'W', OreNames.STONE, 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'D', Engine.itemSimpleCraftingTools.getDrill()));
            EnumSet<GenMaterial> mats = EnumSet.allOf(GenMaterial.class);
            mats.remove(GenMaterial.UNKNOWN);
            for (GenMaterial material : mats) {
                if (OreDictionary.getOres("ingot" + LanguageUtility.capitalizeFirst(material.name().toLowerCase()), false).size() > 0 && !DefinedGenItems.GEAR.ignoreMaterials.contains(material)) {
                    //TODO change tools to iron
                    GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.GEAR.item, 1, material.ordinal()), "WH", "DC", 'W', "ingot" + LanguageUtility.capitalizeFirst(material.name().toLowerCase()), 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'D', Engine.itemSimpleCraftingTools.getDrill()));
                }
            }
        }
    }
}
Also used : RecipeTool(com.builtbroken.mc.lib.recipe.item.RecipeTool) GenMaterial(com.builtbroken.mc.core.content.resources.GenMaterial) ItemStack(net.minecraft.item.ItemStack)

Example 3 with GenMaterial

use of com.builtbroken.mc.core.content.resources.GenMaterial in project Engine by VoltzEngine-Project.

the class GrinderRecipeLoad method generateRecipes.

@Override
protected void generateRecipes(List<MRItemStack> recipes) {
    recipes.add(newRecipe(Blocks.sand).addInputOption(Blocks.stone).addInputOption(Blocks.cobblestone));
    recipes.add(newRecipe(new ItemStack(Blocks.sand, 4)).addInputOption(Blocks.sandstone));
    //Generate ore dictionary recipes for impure dust
    if (DefinedGenItems.DUST_IMPURE.item != null) {
        for (GenMaterial mat : GenMaterial.values()) {
            if (mat != GenMaterial.UNKNOWN && !DefinedGenItems.DUST_IMPURE.ignoreMaterials.contains(mat)) {
                final String type = LanguageUtility.capitalizeFirst(mat.name().toLowerCase());
                //Ore -> Dust
                //TODO add output of tiny dust, and stone dust
                processOreRecipes(recipes, DefinedGenItems.DUST_IMPURE.stack(mat), "ore" + type);
                if (DefinedGenItems.RUBBLE.item != null) {
                    //TODO add output of tiny dust, and stone dust
                    recipes.add(newRecipe(DefinedGenItems.DUST_IMPURE.stack(mat, 2)).addInputOption(DefinedGenItems.RUBBLE.stack(mat)));
                }
            }
        }
    }
    if (DefinedGenItems.DUST.item != null) {
        for (GenMaterial mat : GenMaterial.values()) {
            if (mat != GenMaterial.UNKNOWN && !DefinedGenItems.DUST.ignoreMaterials.contains(mat)) {
                final String type = LanguageUtility.capitalizeFirst(mat.name().toLowerCase());
                //Ingot -> Dust
                processOreRecipes(recipes, DefinedGenItems.DUST.stack(mat), "ingot" + type);
                if (DefinedGenItems.PLATE.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat)).addInputOption(DefinedGenItems.PLATE.stack(mat)));
                }
                if (DefinedGenItems.ROD.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat)).addInputOption(DefinedGenItems.ROD.stack(mat)));
                }
                if (DefinedGenItems.GEAR.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat)).addInputOption(DefinedGenItems.GEAR.stack(mat)));
                }
                if (DefinedGenItems.AX_HEAD.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat, 3)).addInputOption(DefinedGenItems.AX_HEAD.stack(mat)));
                }
                if (DefinedGenItems.SHOVEL_HEAD.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat)).addInputOption(DefinedGenItems.SHOVEL_HEAD.stack(mat)));
                }
                if (DefinedGenItems.SWORD_BLADE.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat, 2)).addInputOption(DefinedGenItems.SWORD_BLADE.stack(mat)));
                }
                if (DefinedGenItems.PICK_HEAD.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat, 3)).addInputOption(DefinedGenItems.PICK_HEAD.stack(mat)));
                }
                if (DefinedGenItems.HOE_HEAD.item != null) {
                    recipes.add(newRecipe(DefinedGenItems.DUST.stack(mat, 2)).addInputOption(DefinedGenItems.HOE_HEAD.stack(mat)));
                }
            }
        }
    }
}
Also used : GenMaterial(com.builtbroken.mc.core.content.resources.GenMaterial) ItemStack(net.minecraft.item.ItemStack) MRItemStack(com.builtbroken.mc.lib.recipe.item.MRItemStack) MRLoaderItemStack(com.builtbroken.mc.lib.recipe.item.MRLoaderItemStack)

Example 4 with GenMaterial

use of com.builtbroken.mc.core.content.resources.GenMaterial in project Engine by VoltzEngine-Project.

the class PlateRecipeLoader method postInit.

@Override
public void postInit() {
    if (DefinedGenItems.PLATE.item != null) {
        if (Engine.itemSimpleCraftingTools != null) {
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.PLATE.item, 1, GenMaterial.WOOD.ordinal()), "H ", "CW", 'W', "plankWood", 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel()));
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.PLATE.item, 1, GenMaterial.STONE.ordinal()), "H ", "CW", 'W', "stone", 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'F', Engine.itemSimpleCraftingTools.getFile()));
            EnumSet<GenMaterial> mats = EnumSet.allOf(GenMaterial.class);
            mats.remove(GenMaterial.UNKNOWN);
            mats.remove(GenMaterial.WOOD);
            mats.remove(GenMaterial.STONE);
            for (GenMaterial material : mats) {
                if (!DefinedGenItems.PLATE.ignoreMaterials.contains(material)) {
                    //TODO change to iron tools
                    GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.PLATE.item, 1, material.ordinal()), "WH", "F ", 'W', "ingot" + LanguageUtility.capitalizeFirst(material.name().toLowerCase()), 'H', Engine.itemSimpleCraftingTools.getHammer(), 'F', Engine.itemSimpleCraftingTools.getFile()));
                }
            }
        }
    }
}
Also used : RecipeTool(com.builtbroken.mc.lib.recipe.item.RecipeTool) GenMaterial(com.builtbroken.mc.core.content.resources.GenMaterial) ItemStack(net.minecraft.item.ItemStack)

Example 5 with GenMaterial

use of com.builtbroken.mc.core.content.resources.GenMaterial in project Engine by VoltzEngine-Project.

the class RodRecipeLoader method postInit.

@Override
public void postInit() {
    if (DefinedGenItems.ROD.item != null) {
        if (Engine.itemSimpleCraftingTools != null) {
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.ROD.item, 1, GenMaterial.WOOD.ordinal()), "WH", "FC", 'W', "plankWood", 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'F', Engine.itemSimpleCraftingTools.getFile()));
            GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.ROD.item, 1, GenMaterial.STONE.ordinal()), "WH", "FC", 'W', "stone", 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'F', Engine.itemSimpleCraftingTools.getFile()));
            EnumSet<GenMaterial> mats = EnumSet.allOf(GenMaterial.class);
            mats.remove(GenMaterial.UNKNOWN);
            mats.remove(GenMaterial.WOOD);
            mats.remove(GenMaterial.STONE);
            for (GenMaterial material : mats) {
                if (!DefinedGenItems.ROD.ignoreMaterials.contains(material)) {
                    //TODO change to iron tools
                    GameRegistry.addRecipe(new RecipeTool(new ItemStack(DefinedGenItems.ROD.item, 1, material.ordinal()), "WH", "FC", 'W', "ingot" + LanguageUtility.capitalizeFirst(material.name().toLowerCase()), 'H', Engine.itemSimpleCraftingTools.getHammer(), 'C', Engine.itemSimpleCraftingTools.getChisel(), 'F', Engine.itemSimpleCraftingTools.getFile()));
                }
            }
        }
    }
}
Also used : RecipeTool(com.builtbroken.mc.lib.recipe.item.RecipeTool) GenMaterial(com.builtbroken.mc.core.content.resources.GenMaterial) ItemStack(net.minecraft.item.ItemStack)

Aggregations

GenMaterial (com.builtbroken.mc.core.content.resources.GenMaterial)10 ItemStack (net.minecraft.item.ItemStack)9 RecipeTool (com.builtbroken.mc.lib.recipe.item.RecipeTool)5 DefinedGenItems (com.builtbroken.mc.core.content.resources.DefinedGenItems)2 MRItemStack (com.builtbroken.mc.lib.recipe.item.MRItemStack)2 MRLoaderItemStack (com.builtbroken.mc.lib.recipe.item.MRLoaderItemStack)2 BlockHeatedStone (com.builtbroken.mc.core.content.blocks.BlockHeatedStone)1 ItemCircuits (com.builtbroken.mc.core.content.parts.ItemCircuits)1 ItemCraftingParts (com.builtbroken.mc.core.content.parts.ItemCraftingParts)1 ItemGenMaterial (com.builtbroken.mc.core.content.resources.items.ItemGenMaterial)1 ItemSheetMetal (com.builtbroken.mc.core.content.resources.items.ItemSheetMetal)1 BlockOre (com.builtbroken.mc.core.content.resources.ore.BlockOre)1 ItemBlockOre (com.builtbroken.mc.core.content.resources.ore.ItemBlockOre)1 ItemSheetMetalTools (com.builtbroken.mc.core.content.tool.ItemSheetMetalTools)1 ItemSimpleCraftingTool (com.builtbroken.mc.core.content.tool.ItemSimpleCraftingTool)1 BlockMultiblock (com.builtbroken.mc.framework.multiblock.BlockMultiblock)1 MRHandlerItemStack (com.builtbroken.mc.lib.recipe.item.MRHandlerItemStack)1 PlacementData (com.builtbroken.mc.lib.world.edit.PlacementData)1 PlacementDataExtended (com.builtbroken.mc.lib.world.edit.PlacementDataExtended)1 ItemBlockMetadata (com.builtbroken.mc.prefab.tile.item.ItemBlockMetadata)1