From 3c20906a6baacf0746b3d1cda233d335f0ae8cb6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 4 Jul 2024 07:13:33 +1000 Subject: [PATCH] Fix wolf armor not dropping from use of shears By: md_5 --- .../minecraft/world/entity/animal/EntityWolf.patch | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch b/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch index 314ec865e4..cd34390720 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityWolf.patch @@ -69,7 +69,17 @@ return EnumInteractionResult.sidedSuccess(this.level().isClientSide()); } else { if (item instanceof ItemDye) { -@@ -480,7 +491,7 @@ +@@ -463,7 +474,9 @@ + this.playSound(SoundEffects.ARMOR_UNEQUIP_WOLF); + itemstack1 = this.getBodyArmorItem(); + this.setBodyArmorItem(ItemStack.EMPTY); ++ this.forceDrops = true; // CraftBukkit + this.spawnAtLocation(itemstack1); ++ this.forceDrops = false; // CraftBukkit + return EnumInteractionResult.SUCCESS; + } else if (((RecipeItemStack) ((ArmorMaterial) EnumArmorMaterial.ARMADILLO.value()).repairIngredient().get()).test(itemstack) && this.isInSittingPose() && this.hasArmor() && this.isOwnedBy(entityhuman) && this.getBodyArmorItem().isDamaged()) { + itemstack.shrink(1); +@@ -480,7 +493,7 @@ this.setOrderedToSit(!this.isOrderedToSit()); this.jumping = false; this.navigation.stop(); @@ -78,7 +88,7 @@ return EnumInteractionResult.SUCCESS_NO_ITEM_USED; } else { return enuminteractionresult; -@@ -498,7 +509,8 @@ +@@ -498,7 +511,8 @@ } private void tryToTame(EntityHuman entityhuman) {