On the initial generation (before any player interactions, and not repopulation) of a village, what determines where the villagers will spawn? Will they spawn inside houses within a radius of the center? Or outside on the gravel paths/farms?.
minecraft-java-edition – How to Handle Initial Villager Spawning in Minecraft
minecraft-java-edition
Related Topic
- Minecraft – Stuck after spawning in Minecraft
- Minecraft – Do Villagers count towards the passive mob total with respect to animal spawning
- Minecraft – Villagers won’t breed – plenty of food, fully traded
- Minecraft Villager not breeding and villagers not moving
- Minecraft Java Edition – How Far a Villager Needs to Be from Village to Run to It?
- Minecraft – Will Villagers use non-house doors
- Minecraft – Mob farming: 240-radius of air vs. 128-radius of lit caves
- Minecraft Java Edition – How to Prevent Villager Children from Disappearing
Best Answer
During generation, a structure has the option to run the following function:
As long as the number villagers spawned for this individual structure is less than the maximum input, it will attempt to spawn a villager at the specified coordinates (which are initially relative to the corner of the structure's bounding box) provided it's not inside a block. To reiterate: the
villagersSpawned
is not for the entire village, but for this individually-spawned structure.An example of the function being called, which is used by the "church" structure:
The maximum number of villagers to spawn inside a church is 1 and will always spawn at the provided offset coordinates.
Out of all the structures available, only large and small farms do not use this function.
Here are images where villagers will always spawn, represented by armor stands (though rotation of the structure may cause them to be mirrored on the other side).
Overview
Here is an example village where villager spawns are highlighted (armor stands with the Glowing effect):
Church
Wood Hut
Large House
Butcher's Shop
Library
Small House
Blacksmith