Iron Golems can wander away from a village even there's 30 - 20 villagers and 20 - 10 beds even they are naturally spawnded from a village or via /summon iron_golem ~ ~ ~ minecraft:from_village
Steps to reproduce
Create a new world
Expand/find a naturally generated village (not abandoned)
Add more beds/villagers (optional)
Wait for an hour/minutes for an iron golem to wander away
You will see him get pass the village border
As it passes do /summon iron_golem ~ ~ ~ minecraft:from_village
Wait for another hour or minutes
You will see the ai is broken
Linked issues
Attachments
Comments 13

By the way this bug also happend in versions release 1.16.100 1.16.101 1.16.200 1.16.201 and betas of 1.16
By the way this bug also happend in versions release 1.16.100 1.16.101 1.16.200 1.16.201 and betas of 1.16
Cannot reproduce. Tested for about an hour with results below. Village on the left had natural village-spawned iron golems and village on the right had iron golems spawned via /summon iron_golem ~~~ minecraft:from_village
[media]
Cannot reproduce. Tested for about an hour with results below. Village on the left had natural village-spawned iron golems and village on the right had iron golems spawned via /summon iron_golem ~~~ minecraft:from_village
[media]
If you were testing with mob spawning and daylight cycle on, it's possible the iron golem was chasing monsters and eventually delinked from the village because it was outside for > 20 minutes.