diff options
Diffstat (limited to 'patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch')
-rw-r--r-- | patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch new file mode 100644 index 0000000000..8e69a76f25 --- /dev/null +++ b/patches/server/0693-Add-a-bunch-of-missing-forceDrop-toggles.patch @@ -0,0 +1,48 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Tue, 20 Jul 2021 21:25:35 -0700 +Subject: [PATCH] Add a bunch of missing forceDrop toggles + + +diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java +index e47f3092b6bd6b86b577de705db1a575d0952348..490212cfe4e5cea7219eaf4304e14bfac0e6472d 100644 +--- a/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java ++++ b/src/main/java/net/minecraft/world/entity/ai/behavior/WorkAtComposter.java +@@ -100,7 +100,9 @@ public class WorkAtComposter extends WorkAtPoi { + ItemStack itemstack = inventorysubcontainer.addItem(new ItemStack(Items.BREAD, j)); + + if (!itemstack.isEmpty()) { ++ entity.forceDrops = true; // Paper + entity.spawnAtLocation(itemstack, 0.5F); ++ entity.forceDrops = false; // Paper + } + + } +diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java +index 306aa8c36be92d66ebcc6b7e0dbb9dee6ec41a9b..8db4fc59b99694d2b15af188fc1c39ccf0090a8d 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java +@@ -522,7 +522,9 @@ public class Panda extends Animal { + } + + if (!this.level.isClientSide() && this.random.nextInt(700) == 0 && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { ++ this.forceDrops = true; // Paper + this.spawnAtLocation((ItemLike) Items.SLIME_BALL); ++ this.forceDrops = false; // Paper + } + + } +diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +index de4e35305f08cc92876f51edadbe69a620a8166e..f65d32245556e2acab927a29626749edea980f0a 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java ++++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +@@ -305,7 +305,9 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento + @Override + protected void finishConversion(ServerLevel world) { + PiglinAi.cancelAdmiring(this); ++ this.forceDrops = true; // Paper + this.inventory.removeAllItems().forEach(this::spawnAtLocation); ++ this.forceDrops = false; // Paper + super.finishConversion(world); + } + |