Village

Villages are groups of buildings inhabited by villagers, cats, iron golems and occasionally, zombie villagers, wandering traders and trader llamas, that generate naturally in the Overworld.

Generation
Villages generate naturally in plains, savanna, taiga, snowy tundra, and desert biomes. $$, they also generate in snowy taiga, sunflower plains, taiga hills, and snowy taiga hills biomes. The type of the village, and therefore the style of all structures within it, is determined by the biome at the village center or meeting point. If the meeting point does not generate in one of the above biomes, the village will default to the plains style.

The following table describes what biomes will result in what styles.

The number of villagers spawned depends on the number of beds in the village. Villagers spawn only in houses that have beds, while job site buildings (with no beds) always generate without villagers.

If a building or pathway generates over open air, circular or square platforms of grass or sand (depending on the terrain) will generate below the structure, which can cause surface oddities. This can be clearly seen when a village building generates over an ocean. Farms generate a few blocks of open space above them if they happen to generate inside a hill.

2% of villages generate as zombie villages; see.

Mobs

 * Upon generation
 * s (spawn in regular villages only)
 * s (spawn in regular villages only; one spawns near a village meeting point)
 * s (spawn in zombie villages only)
 * s (spawn in regular villages)
 * s (spawn in regular villages)
 * s (spawn in regular villages)
 * (spawn in regular villages)


 * Periodically
 * s (one spawns periodically at a village meeting point)
 * s (two spawn periodically at a village meeting point alongside a wandering trader)
 * s (spawn naturally inside villages)


 * During events
 * s (spawn during zombie sieges)
 * s (spawn during raids)
 * s (spawn during raids)
 * s (spawn during raids)
 * es (spawn during raids)
 * s (spawn during raids)
 * es (spawn during raids)

Raids
A player who kills an illager captain receives the Bad Omen status effect for 100 minutes. Like other status effects, Bad Omen can also be cleared by dying or drinking milk. Entering a village boundary while the effect is active triggers a raid, in which groups of illagers spawn and attack the village.

Zombie sieges
Zombie sieges are in-game events that occur when many zombies spawn in a village, regardless of how well lit or walled off a village is. They have a 10% chance of occurring at midnight every night or during thunderstorms when a village has at least 20 valid beds.

Buildings
The number of buildings making up a village can vary, and not every village consists of all building types at once. Apart from the meeting point, which is unique and systematic, the number of buildings of each type is randomly generated and increased in superflat worlds. The number of lamp posts and decorative structures (hay bales, melon patch, pumpkin patch, snow and ice patches) has no restriction, as they are generated where no other buildings can be placed. Paths are found between the buildings of the village and often extend beyond them.

Structures are chosen randomly from a pool of possible buildings. No one building has a greater chance to appear than another.

Architecture style, and blocks making up the village structures, vary according to village type. Not every building can generate in a single village, although some blocks can be found in any village, such as job site blocks and food items.

$$ buildings have different probabilities of generating, depending on village type; for example, a weaponsmith shop is more likely to appear in a Taiga village than other villages.

Paths


Villages generate paths between the buildings and extending outside of the village. Village paths generate at the level of existing terrain, potentially going up steep hills or down ravines without regard for whether an entity could actually traverse the path. Paths do not go below sea level and replace only grass blocks (with air above), water, lava, sand, sandstone, and red sandstone; all other blocks are ignored and the blocks underneath are considered for replacement instead.

In plains, savanna, taiga, and snowy villages, paths are comprised of grass paths and grass. Savanna villages will also generate farmland and crops in some paths. Grass paths that generate over water will be replaced by the village style's planks type. Desert villages generate with smooth sandstone paths.

In Buffet worlds with cave generation, paths may generate on a separate layer from the rest of the buildings. In floating island generation, paths may not generate at all.

Zombie villages
A village has a chance of generating as a zombie village. This chance is 2% $$, and appears to be 25%-30% $$. In such villages, all generated villagers are instead zombie villagers, and all doors and light sources are missing. These zombie villagers do not despawn but have no special resistance to sunlight. In zombie villages, some blocks and cobblestone are replaced by cobwebs and mossy cobblestone, respectively. All regular glass panes are also replaced by brown stained glass panes. Zombie Villages also spawn stray cats!

Mechanics
A village always consists of at least one acceptable bed and one villager. Rarely, a village structure can generate without buildings with beds, thus not qualifying as a village. Upon creation, a village center is defined as a bed claimed by the first villager, or the gathering site block (a bell), and the village's size is the greater of 32 blocks or the distance to the furthest bed from the center. Any villager, village golem, siege-spawned zombie, or raid-spawned illagers will pathfind back into the village if they find themselves farther than "size" blocks from the center.

Villages are set by the number of valid beds in the village. $$, a "valid bed" is a bed unobstructed by other blocks so that it can be used for sleeping.

The minimum population of a village is the number of valid beds. If the population drops below that point (due to death or kidnappings), but there are at least two villagers left who can reach each other, the villagers mate and breed until the population is above the minimum.

Gathering site
Villages have gathering sites where villagers may mingle. A gathering site is defined as a bell located within the village boundary. A wandering trader may spawn at a gathering site, accompanied by trader llamas.

Job site blocks
Job site blocks are blocks such as grindstones, smithing tables, and lecterns, which are used by villagers. Villagers with the corresponding professions spend their time in front of their job site block, except for nitwits and unemployed villagers (villagers without profession overlays).

Popularity
A player's popularity starts at zero and ranges between −30 and 30, and the following can alter a player's popularity: When a player acts directly on a villager, particles around that villager indicate the change in popularity. A player's popularity does not reset on death, and players cannot alter other players' popularity. Popularity is stored per village; a player may have high popularity in one village and a low one in another. Additionally, because popularity is stored per village, if the entire village is destroyed, any accumulated popularity, positive or negative, is also eliminated.

If a player has -15 popularity or less, the village's naturally-spawned iron golems act hostile to that player until the player's popularity is increased. Golems constructed by the player, however, are always passive toward the player.

Trivia



 * According to Jeb, originally they wanted a system for a village to expand in population if the player improves it. But they found that it was computationally expensive to evaluate what constituted a house, so to make it simple, they decided that a door with an inside and outside counts as a house; however, the house was later changed to beds.
 * Prior to Village and Pillage, the farms in villages would avoid overhanging by filling in the area below them with dirt when they spawned. When a farm overhangs a ravine, a tall rectangular dirt structure generates underneath. Buildings would fill the area below them with cobblestone, often resulting in the same behavior.
 * Occasionally, surface ravines generate through villages, causing missing pathways or even entire buildings sunken into the ravine. This also applies to cave entrances and other surface oddities.
 * In rare cases, players can find very small villages containing only one house, or even just one job site building (a building with job site blocks) without any houses (building with beds), causing the village to not spawn any villagers.
 * The plains village is the only type of village with much of its architecture resembling its old counterpart prior to Village & Pillage.