Use dropped item for stats info (#12747)

We are already using the dropped stack to determine the type, we
might as well also use it for the count, given that plugins can already
mutate the type, might as well let them mess with the amount.
This commit is contained in:
Shane Freeder
2025-06-26 19:44:29 +01:00
committed by GitHub
parent e382e6872c
commit 35b2c6ece4
4 changed files with 16 additions and 15 deletions

View File

@@ -1334,7 +1334,8 @@
if (traceItem) {
- ItemStack itemStack = itemEntity != null ? itemEntity.getItem() : ItemStack.EMPTY;
if (!itemStack.isEmpty()) {
this.awardStat(Stats.ITEM_DROPPED.get(itemStack.getItem()), droppedItem.getCount());
- this.awardStat(Stats.ITEM_DROPPED.get(itemStack.getItem()), droppedItem.getCount());
+ this.awardStat(Stats.ITEM_DROPPED.get(itemStack.getItem()), itemStack.getCount()); // Paper - use size from dropped item
this.awardStat(Stats.DROP);
}
}