A villager is an intelligent passive NPC that the player can trade with. A villager wears clothing according to one of six professions, and many of these professions are subdivided into various careers.
Witches are hostile villager-like mobs which spawn rarely in the Overworld according to the usual mob spawning rules. They can also spawn exclusively in witch huts, or spawn from a villager struck by lightning.
Villagers have no drops. They also do not drop experience points.
Upon spawning, villagers will leave their homes and begin to explore the village. Generally, they wander aimlessly inside the village during the day. They may go indoors or outdoors. Occasionally, two villagers may stop and turn to look at each other, in a behavior called socializing, in which they will stare at another villager for a few seconds at a time. In the case of players, they will continuously stare at them as long as the player is close enough, unless the villager tries to get into a house at night, farm food, or run away from a zombie. When a player attacks a villager, the villager will not run away, but anger particles will fly out from the villager if it is in a village.
In Bedrock Edition, villagers do not stop continuously in front of players. They will also run away if the player attacks them.
Villagers, like other mobs, will find paths around obstructions and will avoid some harmful blocks and walking off cliffs. However, in crowded situations it”s possible for one villager to push another off a cliff or into harm.
At night or during rain, villagers will run inside, closing doors behind them, and staying indoors until morning. In the morning they will head outside and resume normal behavior.
Villagers will run away from zombies, vindicators and vexes within 8 blocks, and evokers within 12 blocks.
If a villager finds itself outside the village boundary, or a villager without a village detects a village boundary within 32 blocks, it will move quickly back within the boundary. A villager taken more than 32 blocks away from its village boundary will forget the village within about 6 seconds. Whether in a village or not, a villager is never prone to despawning.
Villagers cannot open trapdoors, fence gates, or iron doors.
There is evidence that villagers are prone to overcrowding certain areas of a village while leaving other areas completely empty. When moving inside, the AI prefers doors within 16 blocks (Euclidean distance). It also tends to prefer doors with fewer villagers nearby, however “nearby” in this case is only 1.5 blocks and, when moving inside, villagers prefer to move 2.5 blocks inside when the inside is to the south or east and therefore will be out of range of this check. During the day, it has been observed that villagers will tend to cluster near a trapped villager or any existing large cluster of villagers, likely due to the “socialize” AI routine overriding their inclination to wander.
Picking up items
Villagers have eight hidden inventory slots, which start empty whenever the villager is spawned. Villagers will not intentionally seek out items to pick up, but they will collect any bread, carrots, potatoes, wheat, seeds, beetroot and beetroot seeds they happen to come within range of. These are the only items they are able to pick up, though the player may use the /replaceitem command to put an arbitrary item into a villager”s inventory. If a player and a villager are in the pickup range of an item at the same time, the player will always pick it up first.
Any items in these slots are lost if a villager becomes a zombie villager; a zombie villager has no inventory slots.
If /gamerule mobGriefing is false, villagers will not pick up items.
If a villager has enough food in one inventory stack (6 bread or 24 carrots, potatoes, beetroots, or 18 wheat for Farmers only) and sees a villager without enough food in one inventory stack (3 bread or 12 carrots, potatoes or beetroot for non-Farmers; 15 bread, 60 carrots, potatoes, or beetroot, or 45 wheat for Farmers), the villager may decide to share food with that villager.
To share, a villager finds his first inventory stack with at least 4 bread, carrots, potatoes, or beetroot or with at least 6 wheat, and then throws half the stack (rounded down) in the direction of the target villager. When wheat is shared, it is first crafted to bread which may result in 1 or 2 less than half the stack being shared.
Adult and baby brown-robed villagers, both farmers and other careers, will tend crops within the village boundary.
Villagers far enough outside the boundary of any village will also tend nearby crops.
Farmland to be tended is found by seeking for certain blocks up to 15 blocks away from the villager in X and Z and up to 1 away in Y (a 31×31×3 area total).
If a brown-robed villager does not have enough food in one stack in his inventory (15 bread, 60 carrots, potatoes, or beetroot, or 45 wheat) and finds fully-grown wheat, carrots, potatoes or beetroot, he will move to the crop block and break it. If a brown-robed villager has any seeds, carrots, potatoes, or beetroot seeds in his inventory and finds an air block above farmland, he will move to it and plant a crop. They will always plant from the first eligible slot in their inventory. If /gamerule mobGriefing is false, villagers will not be able to farm.
A group of villager children playing a game of tag.
Baby villagers will sprint around, entering and leaving houses at will. They will sometimes stop sprinting to stare at an Iron Golem. If the Iron Golem is holding a poppy, the children will cautiously take the flower from its hands.
Baby Villagers in Bedrock Edition have a slightly bigger head than in the Console/Java Edition, this also can be seen in different baby mobs in the game as well.
Unlike other breed-able mobs, the parents and child have no personal interactions other than socializing.
Zombies will try to find and attack villagers within a 42 block radius (even when the villager is invisible), and will attempt to break down doors. Zombies will only successfully break doors if the difficulty is set to hard, though only a fraction of zombies spawned in hard mode have the capacity to break doors. This also applies to zombie pigmen if they path find through a door. Villagers will run away from zombies, sometimes hiding in houses. The villager”s only “natural” defense are the iron golems, which attack nearby hostile mobs.
Zombies will try to kill villagers, or convert them to zombie villagers. The chance that the villager will become a zombie villager on death is 0% on Easy, 50% on Normal, and 100% on Hard. Baby villagers can be infected by zombies as well.
Villagers will also run from zombie pigmen.
When lightning strikes between 3–4 blocks of a villager, it will turn into a witch.
Villagers will mate depending on the number of valid beds. If “willing” (see below), villagers will mate as long as there are three beds nearby The type of villager that spawns is not dependent on the villager”s parents.
A valid bed is any bed within the village radius where the number of “outside” spaces within 5 blocks in a straight line on one side of the bed is not the same as the number of “outside” spaces within 5 blocks on the other side of the bed. A space is considered to be “outside” if it has nothing but transparent blocks above it all the way to the sky.
In versions prior to 1.14, doors were used before beds.
A census is periodically taken to determine the current population of the village. All villagers within the horizontal boundary of the village and within 5 vertical blocks of the center will be counted as part of the population to determine if continued villager mating is allowed. However, any villager within the horizontal boundary of the village and within the spherical boundary of the village will attempt to enter mating mode as long as there is at least one villager within the boundary. If two villagers simultaneously enter mating mode while they are close to one another, they will mate with each other and produce a child.
Each villager has a profession, which can be identified by their clothing. Villagers also have careers specific to their profession. The player can identify a villager”s career by reading the title at the top of the trading interface. Below is a table listing the various villagers, with their careers in relation to their professions, as well as the IDs specifying these. While each profession has a 1 in 6 chance of occurring, the probabilities for individual careers to occur are more diversified. They are listed in the table as well.