use of net.minecraftforge.oredict.ShapedOreRecipe in project ICBM-Classic by BuiltBrokenModding.
the class BlockConcrete method genRecipes.
@Override
public void genRecipes(List<IRecipe> recipes) {
recipes.add(new ShapedOreRecipe(new ItemStack(this, 8, 0), "SGS", "GWG", "SGS", 'G', Blocks.gravel, 'S', Blocks.sand, 'W', Items.water_bucket));
recipes.add(new ShapedOreRecipe(new ItemStack(this, 8, 1), "COC", "OCO", "COC", 'C', new ItemStack(this, 1, 0), 'O', Blocks.obsidian));
recipes.add(new ShapedOreRecipe(new ItemStack(this, 8, 2), "COC", "OCO", "COC", 'C', new ItemStack(this, 1, 1), 'O', "ingotSteel"));
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project ConvenientAdditions by Necr0.
the class ModRecipes method initBlocks.
private static void initBlocks() {
if (ModConfigMisc.platform) {
for (EnumDyeColor c : EnumDyeColor.values()) {
String dye = "dye" + c.getUnlocalizedName().substring(0, 1).toUpperCase() + c.getUnlocalizedName().substring(1);
String pane = "paneGlass" + c.getUnlocalizedName().substring(0, 1).toUpperCase() + c.getUnlocalizedName().substring(1);
String block = "blockGlass" + c.getUnlocalizedName().substring(0, 1).toUpperCase() + c.getUnlocalizedName().substring(1);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.platform, 4, c.getMetadata()), "p p", " d ", "p p", 'd', dye, 'p', pane));
ItemStack w = new ItemStack(ModBlocks.platform, 1, OreDictionary.WILDCARD_VALUE);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.platform, 4, c.getMetadata()), w, w, w, w, dye));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.semiSolidBlock, 4, c.getMetadata()), "b b", " d ", "b b", 'd', dye, 'b', block));
w = new ItemStack(ModBlocks.semiSolidBlock, 1, OreDictionary.WILDCARD_VALUE);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(ModBlocks.semiSolidBlock, 4, c.getMetadata()), w, w, w, w, dye));
}
}
if (ModConfigMisc.powderKeg)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.powderKegBlock), "psp", "pgp", "psp", 'p', "plankWood", 's', "slabWood", 'g', "gunpowder"));
if (ModConfigMisc.seedBox_recipe)
GameRegistry.addRecipe(new ShapedOreRecipe(ModBlocks.seedBoxBlock, "tpt", "php", "tpt", 'h', Blocks.HOPPER, 'p', "plankWood", 't', "ingotIron"));
if (ModConfigMisc.displayCase)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.displayCase, 2), "ppp", "p p", "sss", 's', "slabWood", 'p', "paneGlassColorless"));
if (ModConfigBuildingBlocks.ironGolemBlock)
GameRegistry.addRecipe(new ShapedNBTOreRecipe(new ItemStack(ModBlocks.ironGolemBlock, 32), "iii", "isi", "iii", 'i', "blockIron", 's', ModItems.itemSoulGem.setEntityId(new ItemStack(ModItems.itemSoulGem), "minecraft:villager_golem")));
if (ModConfigMisc.enderProofBlock)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.enderProofBlock, 6), "oio", "iwi", "oio", 'o', "obsidian", 'i', Blocks.IRON_BARS, 'w', Items.WATER_BUCKET));
if (ModConfigMisc.enderProofGlass)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.enderProofGlass, 6), "gig", "iwi", "gig", 'g', "blockGlass", 'i', Blocks.IRON_BARS, 'w', Items.WATER_BUCKET));
if (ModConfigMisc.workStation)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.workStation), "sss", "pwp", "pcp", 's', "cobblestone", 'p', "plankWood", 'c', "chestWood", 'w', "workbench"));
if (ModConfigMisc.punjiSticks)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.punjiSticks), "ss", "cc", 's', ModItems.itemSpikes, 'c', new ItemStack(Blocks.STONE_SLAB)));
if (ModConfigMisc.storageCrate)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.storageCrate), "lll", "lcl", "lll", 'l', "logWood", 'c', "chestWood"));
if (ModConfigBuildingBlocks.woodenTile)
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.woodenTile, 8), "sps", "ppp", "sps", 's', "stickWood", 'p', "plankWood"));
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project ICBM-Classic by BuiltBrokenModding.
the class ExEMP method init.
@Override
public void init() {
boolean registered = false;
//IC2:itemAdvBat
Object[] items = { "battery", InventoryUtility.getItem("IC2:itemBatRE"), "capacitorBasic" };
for (Object object : items) {
if (object != null && (!(object instanceof String) || OreDictionary.doesOreNameExist((String) object))) {
RecipeUtility.addRecipe(new ShapedOreRecipe(Explosives.EMP.getItemStack(), "RBR", "BTB", "RBR", 'T', Explosives.REPLUSIVE.getItemStack(), 'R', Blocks.redstone_block, 'B', object), this.getUnlocalizedName(), ICBMClassic.INSTANCE.getConfig(), true);
registered = true;
}
}
if (!registered) {
RecipeUtility.addRecipe(new ShapedOreRecipe(Explosives.EMP.getItemStack(), "RBR", "BTB", "RBR", 'T', Explosives.REPLUSIVE.getItemStack(), 'R', Blocks.redstone_block, 'B', Items.emerald), this.getUnlocalizedName(), ICBMClassic.INSTANCE.getConfig(), true);
}
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project Galacticraft by micdoodle8.
the class ShapedRecipeHandler method loadUsageRecipes.
@Override
public void loadUsageRecipes(ItemStack ingredient) {
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
CachedShapedRecipe recipe = null;
if (irecipe instanceof ShapedRecipes) {
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
} else if (irecipe instanceof ShapedOreRecipe) {
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
}
if (recipe == null || !recipe.contains(recipe.ingredients, ingredient.getItem())) {
continue;
}
recipe.computeVisuals();
if (recipe.contains(recipe.ingredients, ingredient)) {
recipe.setIngredientPermutation(recipe.ingredients, ingredient);
arecipes.add(recipe);
}
}
}
use of net.minecraftforge.oredict.ShapedOreRecipe in project Galacticraft by micdoodle8.
the class ShapedRecipeHandler method loadCraftingRecipes.
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if (outputId.equals("crafting") && getClass() == ShapedRecipeHandler.class) {
for (IRecipe irecipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
CachedShapedRecipe recipe = null;
if (irecipe instanceof ShapedRecipes) {
recipe = new CachedShapedRecipe((ShapedRecipes) irecipe);
} else if (irecipe instanceof ShapedOreRecipe) {
recipe = forgeShapedRecipe((ShapedOreRecipe) irecipe);
}
if (recipe == null) {
continue;
}
recipe.computeVisuals();
arecipes.add(recipe);
}
} else {
super.loadCraftingRecipes(outputId, results);
}
}
Aggregations