From d6cb65cd0f41dd6be57b19e5efa650752f510db7 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 25 Oct 2024 15:04:29 -0700 Subject: [PATCH] Fix boats/minecarts not dropping when destroyed Diff to clone the item was lost, which meant that the spawned item was air. --- patches/server/Fix-item-duplication-and-teleport-issues.patch | 3 ++- patches/server/Restore-vanilla-entity-drops-behavior.patch | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/server/Fix-item-duplication-and-teleport-issues.patch b/patches/server/Fix-item-duplication-and-teleport-issues.patch index 147862446e..fe08e2430f 100644 --- a/patches/server/Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/Fix-item-duplication-and-teleport-issues.patch @@ -28,7 +28,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return null; } // CraftBukkit end - ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack); +- ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack); ++ ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack.copy()); // Paper - copy so we can destroy original + stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe entityitem.setDefaultPickUpDelay(); diff --git a/patches/server/Restore-vanilla-entity-drops-behavior.patch b/patches/server/Restore-vanilla-entity-drops-behavior.patch index b5a27a9a29..30f746c9ca 100644 --- a/patches/server/Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/Restore-vanilla-entity-drops-behavior.patch @@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return null; } // CraftBukkit end - ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack); + ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack.copy()); // Paper - copy so we can destroy original stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe - entityitem.setDefaultPickUpDelay();