diff --git a/paper-server/nms-patches/net/minecraft/world/entity/item/EntityItem.patch b/paper-server/nms-patches/net/minecraft/world/entity/item/EntityItem.patch index 1a1c4b058f..bfa643d5a8 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/item/EntityItem.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/item/EntityItem.patch @@ -64,12 +64,7 @@ this.discard(); } -@@ -255,10 +275,15 @@ - private static void merge(EntityItem entityitem, ItemStack itemstack, ItemStack itemstack1) { - ItemStack itemstack2 = merge(itemstack, itemstack1, 64); - -- entityitem.setItem(itemstack2); -+ if (!itemstack2.isEmpty()) entityitem.setItem(itemstack2); // CraftBukkit - don't set empty stacks +@@ -259,6 +279,11 @@ } private static void merge(EntityItem entityitem, ItemStack itemstack, EntityItem entityitem1, ItemStack itemstack1) { @@ -140,11 +135,3 @@ if (this.pickupDelay == 0 && (this.target == null || this.target.equals(entityhuman.getUUID())) && entityhuman.getInventory().add(itemstack)) { entityhuman.take(this, i); if (itemstack.isEmpty()) { -@@ -390,6 +460,7 @@ - } - - public void setItem(ItemStack itemstack) { -+ com.google.common.base.Preconditions.checkArgument(!itemstack.isEmpty(), "Cannot drop air"); // CraftBukkit - this.getEntityData().set(EntityItem.DATA_ITEM, itemstack); - } -