From 69220708003f5b0c02f5b467a2bfaac13e70c364 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Sun, 20 Jun 2021 22:12:04 -0700 Subject: [PATCH] Fix PlayerDropItemEvent using wrong item (#5924) Co-authored-by: Spottedleaf --- ...PlayerDropItemEvent-using-wrong-item.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch diff --git a/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch new file mode 100644 index 000000000..6a586fa80 --- /dev/null +++ b/patches/server/Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Sun, 20 Jun 2021 21:55:59 -0700 +Subject: [PATCH] Fix PlayerDropItemEvent using wrong item + + +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 ++++ b/src/main/java/net/minecraft/world/entity/player/Player.java +@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity { + } + + double d0 = this.getEyeY() - 0.30000001192092896D; ++ // Paper start ++ ItemStack tmp = stack.copy(); ++ stack.setCount(0); ++ stack = tmp; ++ // Paper end + ItemEntity entityitem = new ItemEntity(this.level, this.getX(), d0, this.getZ(), stack); + + entityitem.setPickUpDelay(40);