From 31ac45a0a272c4c759fd4927172e5e81dd4a34ba Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Tue, 8 Dec 2020 22:21:54 -0600 Subject: [PATCH] Fix curing villager makes equipment disappear --- ...g-villager-makes-equipment-disappear.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch diff --git a/Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch b/Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch new file mode 100644 index 0000000000..edb2b68232 --- /dev/null +++ b/Spigot-Server-Patches/0614-Fix-curing-villager-makes-equipment-disappear.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Tue, 8 Dec 2020 22:06:56 -0600 +Subject: [PATCH] Fix curing villager makes equipment disappear + +This fixes the CB bug where curing a villager that is holding +equipment (weapons/armor) causes the items to disappear instead of drop +to the ground by forcing the items to drop instead of going to the drops +field for the EntityDeathEvent which does not fire for entity conversions. + +diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java +index a5214914a1dd5effe249e6b9372d7ecf441ee1e1..e021c43b43839c00f81a01bfbec59c546d61ba50 100644 +--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java ++++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java +@@ -180,7 +180,9 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo + double d0 = (double) this.e(enumitemslot); + + if (d0 > 1.0D) { ++ this.forceDrops = true; // Paper - fix SPIGOT-6207 + this.a(itemstack); ++ this.forceDrops = false; // Paper - fix SPIGOT-6207 + } + } + }