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
is duplicated by 3
Comments 7
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.
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.