diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-31 01:44:17 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-31 01:44:17 +0100 |
| commit | 40487f07fa5ef31fde99713c0b842d34a0ba3622 (patch) | |
| tree | 2accdb69c2507acd794d5009d520b2255763751b /src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java | |
| parent | c5dfb2ef7353f13d71d8d582aa6d240420ed9ce7 (diff) | |
- Fixed an issue with the Liquids tab
- Changed Entity registration so it only uses 'registerModEntity' to fix potential issues
- Added crystal blocks
- Changed Jewelry Tab to not override TiCon tabs (sorry TiCon, your system is good, but not for me)
- The player renders in the Jewelry GUI (makes it easier for you to see how the jewelry render)
- The Pentagram now has an actual effect
- The Pentagram now renders beneath your feet when you look down and no longer does it in your inventory; it is also a lot smaller
- Working on Structures
- Created my own WeightedRandomItem (why isn't this in vanilla?)
- Updated the curse API so now people can specify when a curse can be activated (I believe the world is all you need :p)
- Some curses can no longer aquired in hardcore (such as Rotten Heart, Midas Touch etc) which would make it impossible to work with and require a total restart of the game (as the only way to get rid of them is by dying to replace them)
Hooraaay for proper changelogs!
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java index 4fe0bd2..c7d32b4 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetalBucket.java @@ -216,11 +216,18 @@ public class ItemMoltenMetalBucket extends Item @Override public String getItemStackDisplayName(ItemStack stack) { - if (JewelryNBT.ingot(stack) != null){ - ItemStack ingot = JewelryNBT.ingot(stack); - if (Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_glass) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_hardened_clay) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.wool) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.carpet)) ingot.setItemDamage(15 - ingot.getItemDamage()); - return StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name").trim() + " " + ingot.getDisplayName().replace("Ingot", " ").trim(); + try{ + if (JewelryNBT.ingot(stack) != null){ + ItemStack ingot = JewelryNBT.ingot(stack); + if (ingot != null){ + if (Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_glass) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.stained_hardened_clay) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.wool) || Item.getIdFromItem(ingot.getItem()) == Block.getIdFromBlock(Blocks.carpet)) ingot.setItemDamage(15 - ingot.getItemDamage()); + return StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name").trim() + " " + ingot.getDisplayName().replace("Ingot", " ").trim(); + }else return StatCollector.translateToLocal("bucket.unknown"); + } + } + catch(Exception e){ + System.out.println("Error: " + e); } - return ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim() + " Metal"; + return ("" + StatCollector.translateToLocal(getUnlocalizedNameInefficiently(stack) + ".name")).trim() + " " + StatCollector.translateToLocal("info.jewelrycraft2.metal"); } } |
