mojira.dev
MC-313190

You can't interact with villagers while holding a villager spawn egg that spawns a different mob

The bug

If the player is holding a villager_spawn_egg that has !entity_data, or entity_data.id is set to something other than villager, the player cannot talk to or trade with a villager.

Note that any spawn egg that has entity_data.id set to villager correctly spawns a baby villager when used on a villager.

How to reproduce

  1. /give @p villager_spawn_egg[!entity_data]

  2. /give @p villager_spawn_egg[entity_data={id:"cow"}]

  3. Hold either item and interact with an employed villager

Expected results

The trading interface should appear

Observed results

Nothing happens

Notes

This has the same cause (but separate code) as MC-215831 – both mobs have obsolete code that is intended to allow spawn eggs to work for spawning baby villagers. But spawning baby villagers works correctly regardless of the presence of this item check, so all it does is block inert or modified villager spawn eggs from falling back to the normal interaction.

Linked issues

Comments 1

tryashtar

(Unassigned)

Unconfirmed

26.3, 26.4 Snapshot 8

Retrieved