From 7401313e16a03156f1ab09fc5eeee44ae431692a Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 4 May 2024 22:48:06 -0700 Subject: [PATCH] fix shear drops for wolf and bogged Fixes #10661 --- .../0582-Add-missing-forceDrop-toggles.patch | 14 ++++++++++++++ .../server/0943-Add-drops-to-shear-events.patch | 12 ++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/patches/server/0582-Add-missing-forceDrop-toggles.patch b/patches/server/0582-Add-missing-forceDrop-toggles.patch index 951b6714f..b89de7428 100644 --- a/patches/server/0582-Add-missing-forceDrop-toggles.patch +++ b/patches/server/0582-Add-missing-forceDrop-toggles.patch @@ -56,6 +56,20 @@ index fb4c7220c4edad54813036d62db7e3eefeda92a3..83d8a09980c4ab3c7c97b07c3dcdb3d7 Panda.this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); int i = Panda.this.isLazy() ? Panda.this.random.nextInt(50) + 10 : Panda.this.random.nextInt(150) + 10; +diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java +index 11f4a2e15d42a029406fe8399b8d93ae136f0295..5ebf49a565af4ab3bead60a83bca2e6561e6a29c 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java +@@ -468,7 +468,9 @@ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder { ++ this.forceDrops = true; ++ this.spawnAtLocation(stack); ++ this.forceDrops = false; ++ }); + } + private void generateShearedMushrooms(java.util.function.Consumer stackConsumer) { + // Paper end - shear drops API if (this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { LootTable lootTable = serverLevel.getServer().reloadableRegistries().getLootTable(BuiltInLootTables.BOGGED_SHEAR); LootParams lootParams = new LootParams.Builder(serverLevel) -@@ -143,11 +148,20 @@ public class Bogged extends AbstractSkeleton implements Shearable { +@@ -143,11 +152,20 @@ public class Bogged extends AbstractSkeleton implements Shearable { .create(LootContextParamSets.SHEARING); for (ItemStack itemStack : lootTable.getRandomItems(lootParams)) {