diff --git a/patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch b/patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch index ab1c467..3adb30f 100644 --- a/patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch +++ b/patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch @@ -5,21 +5,23 @@ 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 f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4..c82934529463be0adeb8585e7f702aebaf2a6a97 100644 +index f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4..2dad46159fb1653aff0ecdd907535ac0c59deeed 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -407,11 +407,14 @@ public class ItemEntity extends Entity { +@@ -407,11 +407,15 @@ public class ItemEntity extends Entity { CompoundTag nbttagcompound1 = nbt.getCompound("Item"); - this.setItem(ItemStack.of(nbttagcompound1)); +- if (this.getItem().isEmpty()) { + // Scissors start - if (this.getItem().isEmpty()) { ++ ItemStack item = ItemStack.of(nbttagcompound1); ++ if (item.isEmpty()) { this.discard(); + return; } -+ this.setItem(ItemStack.of(nbttagcompound1)); ++ this.setItem(item); + // Scissors end }