3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Fix ITEM_DROPPED stat not working properly (#6331)

Dieser Commit ist enthalten in:
Noah van der Aa 2021-08-06 18:46:25 +02:00 committet von GitHub
Ursprung 020f18aaa6
Commit c815948b6d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -4,8 +4,21 @@ Date: Sun, 20 Jun 2021 21:55:59 -0700
Subject: [PATCH] Fix PlayerDropItemEvent using wrong item 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 5b2b6747768e638423c86ce13a419f5a3f63d30d..764ce055a28f355a205c67f60632cac1bd8eb182 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2161,7 +2161,7 @@ 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 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 d197a63bac1238020cd6cacf209bc7c1b463040d..19980b2d627eb3cacf8d0c3e6785ad2206910fbc 100644 index 503c4e296d6f59c6480f6fb9ff5fed47b25d6102..d8780f06efc261a42389e466573a0bcf10c333f6 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -705,6 +705,11 @@ public abstract class Player extends LivingEntity { @@ -705,6 +705,11 @@ public abstract class Player extends LivingEntity {