From b634e059e0db921b4f1dbf7ba3a5d2f8b14e34dd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 25 Jan 2019 20:54:56 +1100 Subject: [PATCH] SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed --- nms-patches/EntityItem.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nms-patches/EntityItem.patch b/nms-patches/EntityItem.patch index de24d3261c..6dd07c3d4f 100644 --- a/nms-patches/EntityItem.patch +++ b/nms-patches/EntityItem.patch @@ -120,11 +120,13 @@ if (this.pickupDelay == 0 && (this.g == null || 6000 - this.age <= 200 || this.g.equals(entityhuman.getUniqueID())) && entityhuman.inventory.pickup(itemstack)) { entityhuman.receive(this, i); if (itemstack.isEmpty()) { -@@ -294,6 +345,7 @@ +@@ -294,7 +345,9 @@ } public void setItemStack(ItemStack itemstack) { + com.google.common.base.Preconditions.checkArgument(!itemstack.isEmpty(), "Cannot drop air"); // CraftBukkit this.getDataWatcher().set(EntityItem.b, itemstack); ++ this.getDataWatcher().markDirty(EntityItem.b); // CraftBukkit - SPIGOT-4591, must mark dirty } + @Nullable