diff --git a/BauSystem_15/src/de/steamwar/bausystem/features/world/InventoryListener_15.java b/BauSystem_15/src/de/steamwar/bausystem/features/world/InventoryListener_15.java index 7160055c..cb5ba25d 100644 --- a/BauSystem_15/src/de/steamwar/bausystem/features/world/InventoryListener_15.java +++ b/BauSystem_15/src/de/steamwar/bausystem/features/world/InventoryListener_15.java @@ -32,12 +32,13 @@ public class InventoryListener_15 { public static boolean checkItemStack(ItemStack item) { net.minecraft.server.v1_15_R1.ItemStack nmsItem = CraftItemStack.asNMSCopy(item); NBTTagCompound tag = nmsItem.getTag(); - assert tag != null; - NBTTagCompound blockTag = tag.getCompound("BlockEntityTag"); - assert blockTag != null; - if (blockTag.hasKey("Items")) { - return drillDown(blockTag.getList("Items", 10), 0, 0) > threshold; + if (tag != null && tag.hasKey("BlockEntityTag")) { + NBTTagCompound blockTag = tag.getCompound("BlockEntityTag"); + if (blockTag.hasKey("Items")) { + return drillDown(blockTag.getList("Items", 10), 0, 0) > threshold; + } } + return false; }