Skip to content

Commit

Permalink
Fix tools without NBT crashing the game in inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 26, 2014
1 parent 47ee4f4 commit e98ffa4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/tconstruct/library/tools/ToolCore.java
Expand Up @@ -759,6 +759,9 @@ public boolean hasEffect (ItemStack par1ItemStack, int pass)
/* Proper stack damage */
@Override
public boolean showDurabilityBar(ItemStack stack) {
if(!stack.hasTagCompound())
return false;

NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
return !tags.getBoolean("Broken") && getDamage(stack) > 0;
}
Expand Down

0 comments on commit e98ffa4

Please sign in to comment.