SteamWar/BauSystem2.0
Archiviert
12
0
Signed-off-by: Chaoscaot <chaoscaot444@gmail.com>
Dieser Commit ist enthalten in:
Chaoscaot 2021-05-24 12:34:02 +02:00
Ursprung d70dda463c
Commit 501a743ff9

Datei anzeigen

@ -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;
}