From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic 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 d202682d0bc0fb22065cda27b23537f526935a5d..84c129fd931596a4cd3aa5b9caa7da1c309b71a7 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); }