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 (#12230)
This commit is contained in:
parent
7a3d0c4e98
commit
a6ce734fd0
2 changed files with 10 additions and 8 deletions
paper-server/patches/sources/net/minecraft/world/entity
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue