mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Fix tools without NBT crashing the game in inventories
This commit is contained in:
1 parent
47ee4f4825
commit
e98ffa46f7
1 file changed
+3
@@ -759,6 +759,9 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
|
||||
/* 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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user