mojira.dev
MC-311524

Zombie villagers' equipped armor is not retained when converting to villagers

Since it was requested that MC-311623 be split up, this report covers equipment transfer when a zombie villager converts to a villager.

When such a conversion occurs, the zombie villager’s equipment is dropped on the ground if the corresponding drop_chances entry is greater than 1f (unless it is armor with Curse of Binding; see MC-260592), or is deleted otherwise. Per the standard outlined in MC-311623, it would be expected that the items a villager cannot make use of (hands, body, saddle) would be dropped according to drop_chances (preferably reflecting the chance value exactly), while the remaining items (armor) would be retained by the villager. Note that villagers being able to wear armor is intended per MC-555615, MC-261666 and related reports.

To reproduce

  1. /summon minecraft:zombie_villager ~ ~ ~ {equipment:{head:{id:chainmail_helmet}},ConversionTime:20,drop_chances:{head:0f}}

  2. Once the conversion takes place /data get entity @n[type=villager] equipment
    ❌ The helmet has been deleted

Expected behavior

The villager would retain the helmet.

Linked issues

MC-260592 Zombie Villagers wearing/holding Curse of Binding items do not drop or keep these items after they are cured Open MC-305199 Villagers' equipped armor is deleted when converting to witches Reopened MC-261666 Armor given to Villagers is lost when they convert to Zombie Villagers Resolved MC-304420 Pigs' equipment is deleted when converting to zombified piglins Open MC-311623 Inconsistent equipment preservation when a mob converts to another mob which cannot normally hold or wear it Resolved

Comments 4

I cannot confirm this. Updated command:

/summon minecraft:zombie_villager ~ ~ ~ {equipment:{head:{id:chainmail_helmet}},ConversionTime:20,drop_chances:{head:2f}}

Only armor that is not guaranteed to drop will not drop. If the zombie villager picks up a dropped item, it will drop it upon conversion.

Interesting. Running /summon minecraft:zombie ~ ~ ~ {equipment:{head:{id:chainmail_helmet}},DrownedConversionTime:20,drop_chances:{head:0f}} underwater results in the drowned keeping the helmet. By contrast, running /summon minecraft:mooshroom ~ ~ ~ {equipment:{head:{id:chainmail_helmet}},drop_chances:{head:2f}} and shearing the mooshroom deletes the helmet. So the zombie villager → villager conversion is in between. I will have to do some work on this report when I next have time.

clamlol

(Unassigned)

Community Consensus

Gameplay

Normal

Mob behaviour

26.2, 26.3 Snapshot 10

Retrieved