mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 13:40:24 -07:00
Fix zombie villager not dropping item once cured (#12230)
This commit is contained in:
parent
7a3d0c4e98
commit
a6ce734fd0
@ -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 @@
|
@@ -1269,6 +_,22 @@
|
||||||
public <T extends Mob> T convertTo(
|
public <T extends Mob> T convertTo(
|
||||||
EntityType<T> entityType, ConversionParams conversionParams, EntitySpawnReason spawnReason, ConversionParams.AfterConversion<T> afterConversion
|
EntityType<T> entityType, ConversionParams conversionParams, EntitySpawnReason spawnReason, ConversionParams.AfterConversion<T> afterConversion
|
||||||
|
@ -57,14 +57,6 @@
|
|||||||
EntityType.VILLAGER,
|
EntityType.VILLAGER,
|
||||||
ConversionParams.single(this, false, false),
|
ConversionParams.single(this, false, false),
|
||||||
villager -> {
|
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 @@
|
@@ -237,19 +_,24 @@
|
||||||
villager.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(villager.blockPosition()), EntitySpawnReason.CONVERSION, null);
|
villager.finalizeSpawn(serverLevel, serverLevel.getCurrentDifficultyAt(villager.blockPosition()), EntitySpawnReason.CONVERSION, null);
|
||||||
villager.refreshBrain(serverLevel);
|
villager.refreshBrain(serverLevel);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user