Village mechanics

This page describes mechanics relating to villages and villagers in the latest version.

Village definition
A village is defined by several factors: the village gathering sites, radius, number of job sites, number of houses, population (number of villagers), population cap (max. number of villagers, based on housing and beds), cat population, and Iron Golems. Players can use these mechanics to build artificial villages.

House
A village needs at least one house and at least one villager in order to be a "village". A "house" is a bed. A village tries to maintain its population at 100% of the number of houses if there are at least two villagers.

Gathering site
The village gathering site is the gathering point of village (even when not located in the middle of the village), defined by claimed bells near claimed beds. When a bell is claimed, green particles appear above the bell. Once the bell is claimed, it is registered as a gathering site. The gathering sites are where the villagers spend their mingling time during the day. If a player is in a village, a wandering trader can spawn at the gathering site. Iron golems spawn near gathering sites when villagers gossip about iron golems while mingling.

The bell must be within the village boundary to be considered the centerpiece of the village, so it needs at least 1 villager and 1 bed. If only villagers and a bell are present without beds, the villagers search for unclaimed beds rather than mingle.

During a raid, in Java Edition a villager goes to gathering sites and rings the bell to warn other villagers. In Bedrock Edition the bell rings automatically.

Adding a bell in a different location, but still near claimed beds, establishes a new gathering site. Villagers split their crowd into different clusters, one for each gathering site. A villager remembers its gathering site and pathfinds toward it during mingling time, even if another gathering site is closer.

Size
The village size is a rectangle 32 blocks from the village center, or 32 blocks from points of interest away from the center. A point of interest is any bed, bell, or job site block. The village center is typically the northwest corner of the village bell, or one of the claimed beds if there is no bell. The smallest rectangular size is 64×64 blocks.

Housing
A "house" is defined as a claimed bed. If the bed is obstructed by a solid block, villagers being unable to pathfind to the bed causes them to fail claiming the bed by showing anger particles over the villager's head and on top of the bed (losing ownership of the bed, but villagers continue to try to reclaim it). If a villager succeeds in sleeping in an obstructed bed, the villager suffocates and likely dies, causing the bed to become unclaimed.

Once a villager has claimed a bed, the claimed bed is registered as a house in the village and the villager remembers the position of the claimed bed, even when underground. In the evening, villagers return to their houses (beds); however, a villager who cannot reach their bed loses ownership of the bed, allowing other villagers to claim it. The previous bed owner then forgets the house location and searches for another unclaimed bed.

Job site
Naturally spawned villagers start as unemployed, but can also spawn as a nitwit. They change their profession by seeking for an unclaimed job site block.

Naturally generated villages consist of two main buildings: a house (any building with beds) and a job site (a building with job site blocks). No villagers spawn in the job site building. If a naturally generated village consists of only job site buildings, then no villagers can spawn, and the structures are not registered as a village.

Employed villagers spend their time working at their job site block, starting in the morning. Unemployed villagers, nitwits, and baby villagers have no job site. Just like claimed beds, once a villager chooses a job site block, the villager remembers its position. They work at morning and at afternoon after mingling at the gathering site.

Transporting villagers
The player can transport villagers to new locations (for the purpose of starting new villages or baiting mob traps) using a variety of techniques:
 * Minecart: The player builds a minecart track from the village to the destination, then pushes a villager into the cart and pushes the cart to the destination.
 * Water path: The player creates a tunnel or walled path with no exits along the way, and then with two water buckets, uses water to push villagers down the path a few blocks at a time, using the empty bucket to retrieve the water block furthest back. A soul sand bubble column can be used to move villagers upward.
 * Boat: A simple way to transport a single villager over ground is to push one into a boat and then drive the boat, which can be rowed (albeit slowly) over land. A boat can move upward by using a piston in the ground or creating an upward bubble column. The player can also drive the boat up to the step, place a second boat on the step, break the first boat (without hitting the villager) to cause the villager to move to the second boat. $$, a boat can be pulled up using a lead.
 * Bell and beds: To move many villagers at once, the player may remove all beds from a village and place one bed down, ring a bell to cause villagers to seek the nearest bed, place another bed down further along in the desired direction and ring the bell again after breaking the first bed, and repeat until reaching the destination. It helps to have two or more players collaborating.
 * Nether portal: If portals have not already been constructed in The Nether, then the player can create a portal at the Overworld destination, travel into the nether and back out again immediately, then build another portal in a village less than 1,024 blocks from the first portal. After pushing villagers into the village portal (manually or by minecart), then pushing them back out again, letting them "cool down" for 30 seconds, and pushing them back in, the villagers should exit from the first portal.

Breeding and population cap
Villagers can sometimes breed without player intervention, but there must be at least two adult villagers who can reach each other. If a player is starting a village from scratch, or recovering from zombie villagers and there are no villagers left (or only one), then they need to acquire more, using one of these methods:


 * Hauling them in from another village, possibly using a method in the above section
 * Bringing them up from an igloo basement
 * Curing zombie villagers
 * Using commands or spawn eggs

Villagers go into love mode (indicated by red heart particles above both their heads) if they have enough food to make themselves and their partner willing. They enter love mode based on their amount of food, not the population cap (based on the number of beds), but can produce a baby only if they have their own beds plus an available bed for the baby, and the beds have two empty blocks above them (there needs to be room for the baby to jump on the bed). If the population cap is met, or the beds are obstructed, angry particles appear above their heads (along with the heart particles), preventing them from mating. Much like with farm animals, when two villagers are in love mode and can see each other, they pathfind towards the other and stare for a few seconds, after which a baby villager spawns next to them. Breeding villagers does not drop experience. This new villager wears clothing dependent on the biome the village is in. It acquires a job after it has grown up and there is a valid, unclaimed job site.

Willingness
Villagers must be "willing" in order to breed.

Villagers can become willing if the player trades with them. Willingness is granted the first time a new offer is traded, or at a one-in-five chance on subsequent trades. This does not cause them to immediately seek out a mate, however.

Villagers can also become willing by having 12 "food" in their inventory. bread counts as 4 food, while carrots, potatoes, and beetroots count as only 1. Farmer villagers occasionally throw harvested crops at villagers, allowing them to pick them up to obtain enough food to become willing.

Breeding consumes 12 "food".

Curing zombie villagers
Players can cure zombie villagers by a golden apple on them while they are affected by weakness. Players can usually apply weakness by brewing potions. In Nether-disabled servers, a witch and a zombie villager are needed. Witches sometimes throw a splash potion of weakness (if a player is within 3 meters), which they can use to their advantage.

After the player uses the splash potion of weakness and the golden apple, the zombie makes a loud sizzling sound, emits orange swirly particles, and shakes. During the conversion time (up to 5 minutes), they still behave as zombies, so they should be protected from sunlight and kept away from nearby villagers. After a few minutes, they turn into regular villagers.

5% of zombies are zombie villagers, so it shouldn't take the player too long to find two that are curable. Additionally, when a villager is attacked by a zombie (any zombie) they have a chance (50% on normal difficulty, and 100% on hard) of turning into a zombie villager instead of just being killed. Zombie villagers are a great way to start an artificial village, because unlike villagers, zombie villagers follow the player long distances. Then when they arrive at the desired location, they can be cured.

Popularity
A player's popularity starts at zero and ranges between −30 and 30. The following can alter a player's 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 a high popularity in one village and a very low one in another. When a player acts directly on a villager, particles around that villager indicate the change in popularity. Conversely, 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 by trading. Golems constructed by the player, however, are always passive toward the player.

Village defenses
This section is very important, particularly if the player lives in a village (This is the section for naturally, non player-built villages.)

Note: this is less of a problem as of Java Edition 1.14, but a village is still vulnerable to being wiped out unless a player establish proper defenses. Non-defended villages are an epidemic and the reason villages are wiped out, leaving the player without a place to trade, so please take time to read this section.

As stated above, the player must set up defenses if they want their village to survive. While time-consuming, the reward is a protected village with villagers which, unless in extremely unusual and unlikely circumstances, lasts forever. The first thing to do is block as many villagers in their houses as possible (make sure the houses are lit up). This is to protect the villagers while building the next (and most time consuming) stage of defenses. Make sure at least five villagers, (with a minimum one farmer, and all preferably non-nitwits) are locked in. The reason for this is their village needs at least five villagers to spawn iron golems, and at least two for breeding.

The next step is building a wall. The player must mine the material for the wall and then build the wall. Make sure the wall is at least 4 blocks high, so skeletons cannot shoot the player and iron golems, and so that zombies cannot enter using elevated terrain. Use fence gates to get in and out of the village once it is enclosed by the wall (villagers cannot open fence gates), as villagers may wander into dangerous areas outside of the enclosed village. They should not include some structures inside the wall enclosure for several reasons; this vital stage of the defenses tends to keep out a majority of mobs once completed, and thus should be completed as quickly as possible, and that some village structures may generate on erratic and elevated terrain, making it not worth it to incorporate them (unless it is an artificial village).

Now that the player has completed the wall, the majority of the work is done (unless there is erratic terrain inside the enclosure). Next, make sure there are no places villagers can get stuck/no dangerous places inside the enclosure. This includes lakes/rivers, lava lakes (most important), caves, and two or more block holes/4 or more block drops. (note: iron golems, in particular, get stuck in water very easily) This is so villagers are not accidentally damaged, and because stuck villagers are especially vulnerable to zombies. After that count the beds in the enclosed village (including those in houses with villagers locked inside), and ensure there are at least ten (there need to be ten beds for iron golems to spawn) and that there is a bell inside the enclosure. (the bell is where the iron golem spawns) If there is no bell, then there probably is one around the outside structures, as villages generate with at least one bell.

The last essential steps are very easy. First, ensure the village is well-lit at night to minimize (not completely stop) monster spawning. Finally go and let the villagers out of their houses. These are the essential steps. Rest assured that the village is safe now (NOTE: The village still may get wiped out, but the chances of that are essentially nonexistent unless there is a player who wants to destroy the village. If that is the case, the only essential step that helps is the iron golem.)

The player may add additional defenses, such as archer towers, redstone traps and the like, although these are generally useful only during a pillager raid. (And the wall prevents the illagers from getting in.)

Another defense would be to dig a moat around the village and cover the outside edge in trapdoors, this meaning that any zombies or pillagers that come near the village fall in.

Artificial village defenses
This is very similar to building defenses for naturally generating villages, but has its own section for clarity.

Artificial villages can be attacked by zombie sieges and pillager raids too, so the player should establish defenses for them as well, and they can do it before bringing the first villagers there! (Note: If they already have an artificial village populated with villagers, refer to regular village defenses).

First, they need to build a wall around the area where they plan to build the artificial village. As the player selects the terrain, and there is no rush, they may incorporate erratic terrain to their liking, but make sure safety accommodations are made for the villagers including lakes/rivers, lava lakes (most important), caves, and two block or more holes/4 or more block drops. Also make sure to use fence gates to get in and out of the walled area.

Next, they need to light up the area inside the village to minimize hostile mob spawning at night. After that, make sure that they placed at least one bell, making sure it has a considerable distance from the wall. After this make sure there are at least 10 beds inside the wall (It is advised to move the beds inside houses with doors later if they are not already).

Next it is time to bring in the villagers. Make sure there are at least two, and that they have spawned an iron golem inside. Next, do some rapid breeding (or bring in more villagers) until there are at least five villagers (more if the enclosure is more than 80 blocks long or wide or tall (only include tall if they use the air for a multi level village)).

After that, they can build the village to their heart's desire, but make sure that additional areas are also walled, and don't tear down the pre-existing wall until the new walls are up and the new area is well lit.

Cats
The number of cats spawned in a village is based on the number of beds in that village. Cats require only one villager, and one cat can spawn for every four beds. The beds don't need to be claimed. Up to 40 beds can be present for a max of 10 cats, and cats respawn based on the number of beds.

If there are two villages, each already with 10 cats, merging the villages into single village does not cause any cats to despawn. However, the number of cats is still capped at 10, so no new cats spawn until the number of cats is below 10.

Cats can be made by the player to run out of the village, thus allowing for more cats to spawn.

Iron golems
Iron golems are spawned when Villagers are talking. Their spawning requirements are:


 * 1) The villager must be gossiping with another villager
 * 2) The villager has recently slept and worked
 * 3) The villager has not seen an iron golem recently
 * 4) The villager has a profession
 * 5) 5 villagers within 10 blocks meet those requirements (other than #1).
 * 6) The random location chosen for the Iron Golem isn't air or liquid that blocks light.

Random location choosing is attempted 10 times within 16 blocks of the villager, and is attempted once from 6 blocks above the chosen x and z, to 6 blocks below it.

Zombie sieges
At midnight, there is a 10% chance that a zombie siege might occur. This is when a large number of zombies spawn in or near a village, attacking what villagers they can reach, crowding around and pounding on the doors of those they can't. On hard or hardcore mode, they can actually break down the wooden doors (this is true of all zombies, not just during sieges.) A zombie siege requires a village of at least 20 villagers and at least 10 beds.

Zombies in sieges ignore the 24-block minimum distance from the player, but other than that, behave absolutely normal (i.e., they do not spawn on glowstone or any other transparent or half block, need a 2×1×1 minimum space, etc.). They can also spawn INSIDE doors, making iron golem farms difficult to build on hard, as zombies beat down doors on hard (they'll attempt to beat them down on other difficulties, but not succeed). However, zombies won't spawn 128 blocks away from them, even though the siege is technically happening in the game code, so the player is safe if they build it high up. They can make houses virtually zombie-proof simply by taking out one ground block from directly in front of the door, and, if necessary, rehanging the door such that the outside is "smooth," i.e. the door's position on its ground block runs consistent with the outside wall. This is because zombies can break only the top half of a door, and if they have to jump, they cannot get through. In addition, they can fill the hole with two layers of carpet to achieve the same effect as zombies cannot pathfind into the door.

Raids
When a player with the 'Bad Omen' debuff enters a village, the Bad Omen effect disappears and a raid occurs. Raids are groups of illagers (pillagers, vindicators, evokers, ravagers, and witches) attacking the village with the intent of killing villagers. They can remove the 'Bad Omen' debuff by drinking milk before entering a village to prevent raids; however, they can also defend a village from a raid, at which point they gain the 'Hero of the Village' buff. This causes villagers to give them steep discounts during trading, as well as bestow various gifts upon them.

Постройка домов для деревенских жителей 教程/村庄机制