Iron Golems will wander away from the village even theres 30 villagers and 20 beds
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