Fix boats/minecarts not dropping when destroyed
Diff to clone the item was lost, which meant that the spawned item was air.
This commit is contained in:
parent
cf03bed519
commit
be2edeac2b
36 changed files with 39 additions and 38 deletions
|
@ -37,7 +37,7 @@ index 419fcb4cd97cf10a2601e02024b999a51a0ff952..df21cd1bd2a3dda7169edbea18bbfdf0
|
|||
loot.addAll(this.drops);
|
||||
this.drops.clear(); // SPIGOT-5188: make sure to clear
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1d66c35b1092b8101f0a803d8c087e5a958875b1..aac1d620bf4cd1f18243f8c53cd32ab16fdeb616 100644
|
||||
index 02b9d280486a23d8eef650566dfaa10ac0b96c9c..cdc5ea3dd9559c076049c86a9fdb4e8bf85ff6c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2678,19 +2678,45 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
@ -80,7 +80,7 @@ index 1d66c35b1092b8101f0a803d8c087e5a958875b1..aac1d620bf4cd1f18243f8c53cd32ab1
|
|||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue