Fix a bug when NBTString does not exist. (#54)

This commit is contained in:
初夏同学 authored and GitHub committed 2023-07-02 09:48:59 +09:00
1 parent 99ebd8efe0
commit 6292b4569f
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) {