fix crash when renaming certain items

This commit is contained in:
Lyfts authored and Martin Robertz committed 2024-05-16 18:51:58 +02:00
1 parent d9e95924cd
commit e7dc1d9bd4
1 file changed
+2 -1
@@ -184,6 +184,7 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
public void closeInventory() {}
public static boolean canRename(NBTTagCompound tags, ItemStack tool) {
return !tags.hasKey("Name") || tags.getString("Name").equals("\u00A7f" + ToolBuilder.defaultToolName(tool));
return tags != null && (!tags.hasKey("Name")
|| tags.getString("Name").equals("\u00A7f" + ToolBuilder.defaultToolName(tool)));
}
}