Fix armor without NBT crashing #1328

This commit is contained in:
Bernhard Bonigl committed 2015-01-14 23:39:11 +01:00
1 parent 2d81be02d3
commit 60af741b46
1 file changed
+4
@@ -15,7 +15,11 @@ public class ActiveTinkerArmor extends ActiveArmorMod
@Override
public void onArmorTick (World world, EntityPlayer player, ItemStack itemStack, ArmorCore armor, ArmorPart type)
{
if(!itemStack.hasTagCompound())
return;
NBTTagCompound tag = itemStack.getTagCompound().getCompoundTag(((IModifyable) itemStack.getItem()).getBaseTagName());
if(tag == null)
return;
if (tag.hasKey("Moss"))
{
int chance = tag.getInteger("Moss");