From 17bc3355c0ee3b1a02e5c861e049bfe4299c3209 Mon Sep 17 00:00:00 2001 From: ganymedes01 Date: Sat, 20 Sep 2014 18:51:54 +0100 Subject: [PATCH] Added ore dict support for glass, iron, gold and diamond as well That will allow crafting the chests with stained glass... if that's not intended change "blockGlass" to "blockGlassColorless". --- .../cpw/mods/ironchest/IronChestType.java | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/main/java/cpw/mods/ironchest/IronChestType.java b/src/main/java/cpw/mods/ironchest/IronChestType.java index 787eb81..3a9c9d3 100644 --- a/src/main/java/cpw/mods/ironchest/IronChestType.java +++ b/src/main/java/cpw/mods/ironchest/IronChestType.java @@ -127,12 +127,12 @@ public enum IronChestType { mainMaterial = translateOreName(mat); addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit, 'm', mainMaterial, 'P', previousTier, /* previous tier of chest */ - 'G', Blocks.glass, 'C', "chestWood", + 'G', "blockGlass", 'C', "chestWood", '0', new ItemStack(blockResult, 1, 0), /* Iron Chest */ '1', new ItemStack(blockResult, 1, 1), /* Gold Chest */ '2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */ '3', new ItemStack(blockResult, 1, 3), /* Copper Chest */ - '4', new ItemStack(blockResult, 1, 4)/* Silver Chest */ + '4', new ItemStack(blockResult, 1, 4) /* Silver Chest */ ); } } @@ -140,23 +140,7 @@ public enum IronChestType { public static Object translateOreName(String mat) { - if (mat.equals("ingotIron")) - { - return Items.iron_ingot; - } - else if (mat.equals("ingotGold")) - { - return Items.gold_ingot; - } - else if (mat.equals("gemDiamond")) - { - return Items.diamond; - } - else if (mat.equals("blockGlass")) - { - return Blocks.glass; - } - else if (mat.equals("obsidian")) + if (mat.equals("obsidian")) { return Blocks.obsidian; }