mojira.dev
MCPE-61976

/summon spawnEvent does not work with villagers

The bug

/summon has a spawnEvent option to run a behavior event when spawning the mob. This does not work for villagers.

How to reproduce

/summon sheep ~ ~ ~ minecraft:entity_born

→ ✔  Baby sheep is spawned

/summon villager ~ ~ ~ minecraft:entity_born

→ ❌  Adult villager is spawned

The entity_born event does exist in the villager behavior file. This bug happens for all villager events, e.g. become_witch.

Notes

This is almost certainly caused by the fact that summoning a villager actually summons a "villager_v2", after some kind of transformation. This transformation is not seamless and causes various minor issues, of which this is one. The best fix is to remove villager_v2 entirely and have villager take its behaviors, because splitting the mobs like this is a horrible hack that should not exist.

Linked issues

Comments 7

I tried on creepers too. but it doesn't work.
the command is:

/summon creeper minecraft:become_charged
and on turtles

(/summon turtle minecraft:lay_egg<is the mob event correct?)

but I think all mob event is broken.

You forgot the coords

I am having this issue with the latest version, is there any known fix?

Can be worked around with a behavior pack, otherwise no

As of 9-2-2020 I too am having this issue where spawn events don't seem to be working for villagers on xbox one bedrock.

I'm having the same issue.  In an effort to find a work around for mobs despawning (MCPE-21416: Mobs and Entities can despawn randomly) I was trying to use the command blocks to re-populate but the spawn event string is not working.  No matter what one I use it creates a random villager with a profession or a child or anything but the string you have added seems to be ignored.  Example of command used was /summon villager ~ ~ ~ minecraft:entity_born

This was done in Win 10 Minecraft.

This is fixed as of 1.17.0. Note, however, that for villagers you do still need to use the "minecraft" namespace, as "entity_born" by itself does not work.

tryashtar

(Unassigned)

328458

Confirmed

Windows

1.16.0.59 Beta, 1.16.0.55 Beta, 1.16.0.51 Beta, 1.14.1 Hotfix, 1.14.30 Hotfix, 1.16.40 Hotfix

1.17.0

Retrieved