1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-23 23:39:34 +01:00

Fix zombie villager not dropping item once cured ()

This commit is contained in:
Lulu13022002 2025-03-08 05:13:25 +01:00 committed by GitHub
parent 7a3d0c4e98
commit a6ce734fd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions
paper-server/patches/sources/net/minecraft/world/entity

View file

@ -326,6 +326,16 @@
}
}
}
@@ -981,7 +_,9 @@
double d = this.getEquipmentDropChance(equipmentSlot);
if (d > 1.0) {
this.setItemSlot(equipmentSlot, ItemStack.EMPTY);
+ this.forceDrops = true; // Paper - Add missing forceDrop toggles
this.spawnAtLocation(level, itemBySlot);
+ this.forceDrops = false; // Paper - Add missing forceDrop toggles
}
}
}
@@ -1269,6 +_,22 @@
public <T extends Mob> T convertTo(
EntityType<T> entityType, ConversionParams conversionParams, EntitySpawnReason spawnReason, ConversionParams.AfterConversion<T> afterConversion

View file

@ -57,14 +57,6 @@
EntityType.VILLAGER,
ConversionParams.single(this, false, false),
villager -> {
@@ -223,6 +_,7 @@
SlotAccess slot = villager.getSlot(equipmentSlot.getIndex() + 300);
slot.set(this.getItemBySlot(equipmentSlot));
}
+ this.forceDrops = false; // CraftBukkit
villager.setVillagerData(this.getVillagerData());
if (this.gossips != null) {
@@ -237,19 +_,24 @@
villager.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(villager.blockPosition()), EntitySpawnReason.CONVERSION, null);
villager.refreshBrain(serverLevel);