From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 13 Mar 2022 14:38:38 -0300 Subject: [PATCH] ItemEntity - Check if items are air before calling setItem diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java index c8d8fdef7b8abc0f59b7d19462825ae30c8d4f48..7126e0ccf894443f5f9c8e365dc1033daf20de57 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -409,11 +409,14 @@ public class ItemEntity extends Entity { CompoundTag nbttagcompound1 = nbt.getCompound("Item"); - this.setItem(ItemStack.of(nbttagcompound1)); + // Scissors start if (this.getItem().isEmpty()) { this.discard(); + return; } + this.setItem(ItemStack.of(nbttagcompound1)); + // Scissors end } @Override