From 5aeb8c87e7c0a805bc2e78c20340a8d620f34f99 Mon Sep 17 00:00:00 2001 From: Noah van der Aa <ndvdaa@gmail.com> Date: Fri, 6 Aug 2021 18:46:25 +0200 Subject: [PATCH] Fix ITEM_DROPPED stat not working properly (#6331) --- .../Fix-PlayerDropItemEvent-using-wrong-item.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch index 6a586fa80f..e7ca8feb4e 100644 --- a/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch +++ b/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -4,6 +4,19 @@ Date: Sun, 20 Jun 2021 21:55:59 -0700 Subject: [PATCH] Fix PlayerDropItemEvent using wrong item +diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java ++++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { + + if (retainOwnership) { + if (!itemstack1.isEmpty()) { +- this.awardStat(Stats.ITEM_DROPPED.get(itemstack1.getItem()), stack.getCount()); ++ this.awardStat(Stats.ITEM_DROPPED.get(itemstack1.getItem()), itemstack1.getCount()); // Paper + } + + this.awardStat(Stats.DROP); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java