geforkt von Mirrors/Paper
Prevent duplicate pickup event for piglins (#11322)
Dieser Commit ist enthalten in:
Ursprung
5f317598d4
Commit
403db04ae4
@ -46,6 +46,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
piglin.take(drop, 1);
|
piglin.take(drop, 1);
|
||||||
itemstack = PiglinAi.removeOneItemFromItemEntity(drop);
|
itemstack = PiglinAi.removeOneItemFromItemEntity(drop);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -0,0 +0,0 @@ public class PiglinAi {
|
||||||
|
} else if (PiglinAi.isFood(itemstack) && !PiglinAi.hasEatenRecently(piglin)) {
|
||||||
|
PiglinAi.eat(piglin);
|
||||||
|
} else {
|
||||||
|
- boolean flag = !piglin.equipItemIfPossible(itemstack, drop).equals(ItemStack.EMPTY); // CraftBukkit
|
||||||
|
+ boolean flag = !piglin.equipItemIfPossible(itemstack, null).equals(ItemStack.EMPTY); // CraftBukkit // Paper - pass null item entity to prevent duplicate pickup item event call - called above.
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
PiglinAi.putInInventory(piglin, itemstack);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren