Prevent crashes with incorrectly initialized armor stuff #1668

This commit is contained in:
Bernhard Bonigl committed 2015-06-28 10:44:56 +02:00
1 parent 13db0488b5
commit 83e71312c4
3 files changed
+11 -4

No files matched your search

@@ -65,8 +65,12 @@ public class TinkerArmorEvents
return;
ItemStack glove = TPlayerStats.get(event.entityPlayer).armor.getStackInSlot(1);
if(event.entityPlayer.worldObj.isRemote) // todo: sync extended inventory with clients so this stuff and rendering is done properly...
glove = ArmorProxyClient.armorExtended.getStackInSlot(1);
if(event.entityPlayer.worldObj.isRemote) { // todo: sync extended inventory with clients so this stuff and rendering is done properly...
if(ArmorProxyClient.armorExtended != null)
glove = ArmorProxyClient.armorExtended.getStackInSlot(1);
else
glove = null;
}
if(glove == null || !glove.hasTagCompound())
return;