13
0
geforkt von Mirrors/Paper

Fix boats/minecarts not dropping when destroyed

Diff to clone the item was lost, which meant that the spawned
item was air.
Dieser Commit ist enthalten in:
Spottedleaf 2024-10-25 15:04:29 -07:00
Ursprung 9f5bf318a5
Commit d6cb65cd0f
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -28,7 +28,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return null; return null;
} }
// CraftBukkit end // 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 + stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();

Datei anzeigen

@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return null; return null;
} }
// CraftBukkit end // 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 stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
- entityitem.setDefaultPickUpDelay(); - entityitem.setDefaultPickUpDelay();