From 6292b4569fe330c8f3e31066afaedc750ea037a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=9D=E5=A4=8F=E5=90=8C=E5=AD=A6?= <30284813+wohaopa@users.noreply.github.com> Date: Sun, 2 Jul 2023 08:48:59 +0800 Subject: [PATCH] Fix a bug when NBTString does not exist. (#54) --- src/main/java/forestry/core/inventory/ItemInventory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/forestry/core/inventory/ItemInventory.java b/src/main/java/forestry/core/inventory/ItemInventory.java index 64ebe0848..39adc4ded 100755 --- a/src/main/java/forestry/core/inventory/ItemInventory.java +++ b/src/main/java/forestry/core/inventory/ItemInventory.java @@ -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) {