From b40a2953324c73d5b88c81032cec2c56a9d0c564 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Fri, 20 Dec 2013 22:14:31 +0200 Subject: Think I fixed the Molder render, as well as made the table work --- common/darkknight/jewelrycraft/item/ItemRing.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'common/darkknight/jewelrycraft/item/ItemRing.java') diff --git a/common/darkknight/jewelrycraft/item/ItemRing.java b/common/darkknight/jewelrycraft/item/ItemRing.java index 1207bac..1c533e4 100644 --- a/common/darkknight/jewelrycraft/item/ItemRing.java +++ b/common/darkknight/jewelrycraft/item/ItemRing.java @@ -112,6 +112,7 @@ public class ItemRing extends ItemBase } NBTTagCompound potionNBT = new NBTTagCompound(); potionNBT.setInteger("potion", potion); + itemStackData.setTag("potion", potionNBT); } /** @@ -133,10 +134,10 @@ public class ItemRing extends ItemBase if (stack.getTagCompound().hasKey("potion")) { - NBTTagCompound potionNBT = new NBTTagCompound();; + NBTTagCompound potionNBT = (NBTTagCompound) stack.getTagCompound().getTag("potion"); int potion = 0; potion = potionNBT.getInteger("potion"); - list.add(EnumChatFormatting.GREEN + Integer.toString(potion)); + list.add(EnumChatFormatting.GREEN + StatCollector.translateToLocal(new PotionEffect(potion, 4).getEffectName())); } } } @@ -146,12 +147,12 @@ public class ItemRing extends ItemBase { if (stack.hasTagCompound()) { - if(stack.getTagCompound().hasKey("effect")) + if(stack.getTagCompound().hasKey("potion")) { if (par3Entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer)par3Entity; - NBTTagCompound potionNBT = new NBTTagCompound(); + NBTTagCompound potionNBT = (NBTTagCompound) stack.getTagCompound().getTag("potion"); int potion = 0; potion = potionNBT.getInteger("potion"); if(potion != 0 && entityplayer != null) entityplayer.addPotionEffect(new PotionEffect(potion, 4)); -- cgit v1.2.3