mojira.dev
MC-276056

Villagers produce a game event of the incorrect frequency when holding armor pieces

If a player holds an emerald in front of a villager selling armor pieces, the villager starts holding an armor piece correctly but produces an equip game event (frequency 5), unlike the entity_action game event (frequency 4) produced when holding any other item.

How to reproduce:

  1. Summon a villager around a cauldron and wait until it claims the workstation as its own and becomes a leatherworker.

  2. Place a calibrated sculk sensor with power 4.

  3. Hold leather in front of the villager, causing it to hold an emerald.
    → ✔ The sensor is triggered.

  4. Hold an emerald in front of the villager, causing it to hold a leather armor piece.
    → ❌ The sensor is not triggered.

  5. Change the sensor's power to 5 and try the previous step again.
    → ❌ The sensor is triggered.
    Note that this also works with armorers holding iron armor pieces, or any other villager holding any kind of armor pieces.

Expected result:

Villagers would produce an entity_action game event no matter what item they start holding.

Observed result:

Villagers produce an entity_action game event only if the held item is not an armor piece, in which case they produce an equip game event, even if they didn't actually equip the armor piece.

Comments 1

Updated the summary and description as this issue affects all villagers holding any armor piece.

goldenfire644

(Unassigned)

Confirmed

Gameplay

Low

Game Events, Mob behaviour

1.21.1, 24w35a

Retrieved