summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/item/ItemRing.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 22:14:31 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-20 22:14:31 +0200
commitb40a2953324c73d5b88c81032cec2c56a9d0c564 (patch)
tree91316eb84921698069bce46951524f41960ba2b6 /common/darkknight/jewelrycraft/item/ItemRing.java
parentc0833c069d04ffa453a8355ff25f548431d6129d (diff)
Think I fixed the Molder render, as well as made the table work
Diffstat (limited to 'common/darkknight/jewelrycraft/item/ItemRing.java')
-rw-r--r--common/darkknight/jewelrycraft/item/ItemRing.java9
1 files changed, 5 insertions, 4 deletions
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));