diff options
author | Spottedleaf <[email protected]> | 2024-10-25 15:04:29 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-10-25 15:04:29 -0700 |
commit | be2edeac2b42ab3d76d9462cd7fab584e13dee9c (patch) | |
tree | 8f8dafa120d6475db1c0f79bb799297d79a4a915 /patches/server/0344-Fix-item-duplication-and-teleport-issues.patch | |
parent | cf03bed519e1a2f74366dd97709b5d72d403b82e (diff) | |
download | Paper-be2edeac2b42ab3d76d9462cd7fab584e13dee9c.tar.gz Paper-be2edeac2b42ab3d76d9462cd7fab584e13dee9c.zip |
Fix boats/minecarts not dropping when destroyed
Diff to clone the item was lost, which meant that the spawned
item was air.
Diffstat (limited to 'patches/server/0344-Fix-item-duplication-and-teleport-issues.patch')
-rw-r--r-- | patches/server/0344-Fix-item-duplication-and-teleport-issues.patch | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch index 128a755a95..77d7c3a5b2 100644 --- a/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5b8e264098f1b713de15f714bae59d3efda365cf..6f1e09087cf2d8dbb61882473b220100e3b0369a 100644 +index 5b8e264098f1b713de15f714bae59d3efda365cf..d5f96ed753e8298085e40c6181285cd6ea838ca2 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2630,11 +2630,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -28,7 +28,8 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..6f1e09087cf2d8dbb61882473b220100 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(); |