mojira.dev
MC-311690

Villagers' equipped items in the body and saddle slots are not dropped according to `drop_chances`, and their main hand item is not dropped this way or deleted, when they convert to zombie villagers

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

When such a conversion occurs, the villager’s equipment is preserved. Per the standard outlined in MC-311623, it would be expected that the items a zombie villager cannot make use of (body, saddle) would be dropped according to drop_chances.

The only undesirable survival impact of the present behavior is a silly one: if the villager was showing an item to the player when the zombie killed it, the zombie villager continues holding the item. Because villagers always have a drop_chances.mainhand value of 0f in survival, and because this is transferred to the zombie villager, there is no way for the player to obtain the villager's item, not even by re-curing the zombie villager. Since an average player may not know that drop_chances has carried over, and thus be tempted to try to retrieve it somehow, special handling such that the villager’s main-hand item is always deleted may be desirable for this conversion.

To reproduce

  1. /summon minecraft:villager ~ ~ ~ {NoAI:1b,equipment:{mainhand:{id:emerald},head:{id:chainmail_helmet},saddle:{id:saddle}},drop_chances:{mainhand:0f,head:2f,saddle:2f}}

  2. /summon minecraft:zombie ~ ~ ~ {NoAI:1b,Silent:1b,equipment:{head:{id:glass}}}

  3. /damage @n[type=minecraft:villager] 30 minecraft:mob_attack by @n[type=zombie]

  4. /data get entity @n[type=minecraft:zombie_villager] equipment
    ✅ The helmet is still equipped
    ❌ The saddle is still equipped
    ❌ The emerald is still held (and yes, I did confirm that this happens this with “normal” villager held items)

Expected behavior

The saddle would be dropped on the ground since the zombie villager cannot make use of it, and the emerald would simply vanish.

Linked issues

MC-311623 Inconsistent equipment preservation when a mob converts to another mob which cannot normally hold or wear it Resolved MC-261666 Armor given to Villagers is lost when they convert to Zombie Villagers Resolved MC-311524 Zombie villagers' equipped armor is not retained when converting to villagers Open MC-311698 Tadpoles' equipment is deleted when converting to frogs Open MC-311697 Hoglins' equipment is not dropped according to `drop_chances` when converting to zoglins Open

Comments 1

clamlol

(Unassigned)

Community Consensus

Platform

Important

Mob behaviour, Village system

26.2, 26.3 Pre-Release 2

Retrieved