Fix a bug when NBTString does not exist.

This commit is contained in:
初夏同学 committed 2023-06-30 23:50:16 +08:00
1 parent 99ebd8efe0
commit 00a507f6e1
1 file changed
+1 -1
@@ -106,7 +106,7 @@ public abstract class ItemInventory implements IInventory, IFilterSlotDelegate {
String baseUID = base.getTagCompound().getString(KEY_UID);
String comparisonUID = comparison.getTagCompound().getString(KEY_UID);
return baseUID != null && comparisonUID != null && baseUID.equals(comparisonUID);
return baseUID != null && !baseUID.isEmpty() && baseUID.equals(comparisonUID);
}
public void readFromNBT(NBTTagCompound nbt) {