From d83ae9e5dff05ec876050fdc64e597b1b54ecd3d Mon Sep 17 00:00:00 2001 From: bspkrs Date: Mon, 16 Dec 2013 23:44:45 -0500 Subject: last ditch effort to get crafting table working --- common/darkknight/jewelrycraft/item/ItemRing.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 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 8953b9a..aa23da3 100644 --- a/common/darkknight/jewelrycraft/item/ItemRing.java +++ b/common/darkknight/jewelrycraft/item/ItemRing.java @@ -75,14 +75,15 @@ public class ItemRing extends ItemBase } } - public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) + @Override + public void onUpdate(ItemStack stack, World par2World, Entity par3Entity, int par4, boolean par5) { - if(stack.hasTagCompound() && stack.getTagCompound().hasKey("effect")) + if (stack.hasTagCompound() && stack.getTagCompound().hasKey("effect") && !par2World.isRemote) { - NBTTagCompound effectNBT = (NBTTagCompound) stack.getTagCompound().getTag("effect"); - PotionEffect effect = new PotionEffect(0, 0); - effect.readCustomPotionEffectFromNBT(effectNBT); - ((EntityPlayer)par3Entity).addPotionEffect(effect); + // NBTTagCompound effectNBT = (NBTTagCompound) stack.getTagCompound().getTag("effect"); + // PotionEffect effect = new PotionEffect(0, 0); + // effect.readCustomPotionEffectFromNBT(effectNBT); + // ((EntityPlayer) par3Entity).addPotionEffect(effect); } } -- cgit v1.2.3