Villager

Villagers are passive mobs that inhabit villages, work at their professions, breed, and interact. Their clothing varies according to their occupation. A player can trade with villagers, using emeralds as currency.

Natural generation
Villagers spawn inhabiting their villages, which spawn in several biomes such as plains, snowy tundras, savannas, deserts, taigas, and snowy taiga.

A priest villager and priest zombie villager spawn locked up in the basements of igloos, under the carpet of the floor. In Bedrock Edition, the villager and zombie villager inside igloo basements have random professions instead of always being clerics.

Baby villagers
Villagers will breed autonomously, but need beds and need to be willing in order to spawn baby villagers. After exactly 20 minutes, the baby villager will grow up to an adult. See for more information.

Curing
Villagers will spawn if a player uses a splash potion of weakness on a zombie villager and then feeds it a regular golden apple. It will then shake and turn into a villager within 2-5 minutes. During the change, the zombie villager can still burn in the sun.

Zombie villagers
When a zombie kills a villager, it can turn the villager into a zombie villager, depending on the difficulty: 0% chance on easy, 50% chance on normal and 100% chance on hard. Zombie villagers also spawn naturally in the Overworld in the same conditions as a normal zombie.

Illagers


Illagers are hostile villager-like mobs that spawn in woodland mansions as well as pillager outposts, illager patrols, or raids. There are four kinds: vindicators, evokers, pillagers, and illusioners, along with two associated mobs: vexes and ravagers. Illagers are considered to be outcasts from villages. In addition to attacking players, they will also attack villagers, wandering traders and iron golems.

Witches
Witches are hostile villager-like mobs, which spawn 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. Witches may also spawn as a part of raids.

Wandering trader
Wandering traders spawn randomly around the world in Java Edition, or periodically in a village gathering site in Bedrock Edition. Two trader llamas spawn leashed to the wandering trader. Players may use emeralds to buy items from wandering traders, but cannot trade items for emeralds. Like villagers, wandering traders are attacked by most zombie variants, illagers, ravagers, and vexes.

NPC
NPCs are villager-like mobs in Education Edition and Bedrock Edition.

Drops
Villagers drop nothing upon death.

Movement patterns
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, and they periodically make mumbling sounds. 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 4-5 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, work or flee from a zombie.

In Java Edition and Bedrock Edition, villagers do not stop continuously in front of players. They will also sprint away if the player attacks them.

Villagers, like other mobs, will find paths around obstructions, avoiding walking off cliffs and some blocks that cause harm. However, in crowded situations, it is 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 if they cannot claim beds, they will stay indoors until morning. In the morning they will head outside and resume normal behavior.

Villagers will run away from zombies, vindicators, pillagers, ravagers, 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.

In Legacy Console Edition, 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 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. Conversely, in Java Edition and Bedrock Edition, villagers have a set schedule in which they socialize and mingle at gathering sites (near a bell) at midday.

Job site blocks
In Java Edition and Bedrock Edition, villagers (other than babies and nitwits) want a profession and employment. An unemployed villager acquires a profession and a job by claiming the first unclaimed job site block it can find. When a job site block is claimed, its owner emits green particles and no other villager can claim it unless the owner relinquishes it. For a list of job site blocks and the professions they are required for see below.

If a job site block is broken or destroyed, its owner (if any) emits anger particles and becomes jobless, but retains its profession. If only at the novice level, a villager can also become profession-less when this happens. A villager who already has a profession but no job tries to acquire a new job:
 * A novice level villager (one who has only its first tier trades unlocked) can claim any job site block and will change its profession along with acquiring a new job.
 * Villagers above the novice level can only claim a job site block associated with their profession.

Schedules
$$, villagers have set schedules depending on their age and employment status. Schedules define the villager's goals, which mostly determine how they behave throughout the day. However, their goals can be interrupted by higher priority behaviors most villagers have, such as fleeing from an attack, trading, and getting out of the rain.

Working
Employed villagers will spend most of their day standing next to their job site blocks. From time to time they will "gather supplies" by wandering a short distance away, then returning.

Some professions have additional job-specific goals that are part of their work schedule:
 * Farmers harvest and sow crops.
 * Fishermen have a custom schedule that allows them to have a job-specific goal, but currently none is defined.
 * Librarians inspect bookshelves.

When a villager can reach its own job site block, it will resupply itself (unlock its locked trades). They can resupply twice per day, morning and afternoon, even without having a bed or while sitting in a minecart. A villager can "reach" its job site block if the block is in any of the 8 directly adjacent or diagonal block spaces horizontally around him at the height of their feet, or at the 9 blocks below that. A villager can still "reach" it diagonally, even if he can't actually see or touch a face of the block.

Wandering
All villagers wander from time to time, but for the unemployed wandering is their main goal because it maximizes their ability to find a job site block they can claim (thereby becoming employed). A wandering villager chooses a random block and walks toward it, then stands there for a variable amount of time before wandering again. If at any time it detects a job site block it can claim, it does so, assumes the skin for the associated profession, and immediately begins following the appropriate schedule.

A villager attempts to claim a job site block by finding a path to a block next to one, showing angry particles when unable to reach it. After a villager fails to reach the job site block several times, it becomes unclaimed, indicated by showing angry particles on it. The villager loses its job site block and eventually becomes jobless if the villager is at novice-level and no nearby job site block is available. Any other nearby jobless villager has a chance to become the block's new owner. If there are no jobless villagers nearby, then the villager who lost the job site block will seek for another unclaimed one, or try to reclaim the same unreachable one in an endless loop (this also happens for claiming beds).

The wander schedule includes a job-specific goal called "exploring the outskirts" that causes villagers to wander near the edges of the village. This enables them to detect new beds, job site blocks, and bells that players have used to extend the village.

Gathering
Late in the day, adult villagers (other than nitwits) gather at a meeting place (the area around a bell). When two villagers encounter one another, they mingle (look at each other and "converse" using unique sounds). They may also share food, or breed if both are willing.

If a villager isn't close enough to detect a bell, it wanders randomly, searching for one.

Playing
Baby villagers wander randomly searching for others to play with. When they find one, the two of them will follow each other for a while and sometimes run as if racing or chasing each other.

Baby villagers wander randomly searching for beds, when they find one they will start to jump on top of it.

They will sometimes stop to stare at an Iron Golem. If the Iron Golem holds out a poppy, the baby villager will cautiously accept it.

Returning home
All villagers except Nitwit head home a short time before sunset and Nitwits go home after sunset. They roam around for a while, eventually targeting a block beside their bed. Once they reach it, they will not go through a door again before sleeping.

A villager who has no bed simply wanders in search of one it can claim.

Sleeping
At sunset, most villagers lie down in their beds and remain there until morning. (Nitwits stay up later at night and get up later in the morning.) They will get up early if, attacked, or if their bed is broken or a player  it. If possible, they will go back to bed after the interruption. When villagers successfully sleep, they will heal themselves when waking up at dawn.

Villagers who have no beds continue wandering and searching for a bed they can claim.

Gossiping
A feature necessary for iron golem spawning and some villager behavior is spreading gossip. Villagers will acquire pieces of gossip through various means, and will spread them to other villagers when they converse. There are six types of gossip:, although does not naturally appear in the game.

Some villager gossip affects the reputation of the player when the villager spreads it to others. A villager generates gossip if it is attacked by a player,  gossip if it is killed by a player (which is immediately lost with its death),  gossip if it is cured by a player, and  gossip if a player traded with the villager. Negative reputation will make villagers increase their prices for the player in question, while positive reputation will make villagers lower prices. Overall reputation will also cause or prevent attacks from the village iron golems.

Villagers will also generate gossip on their own. If a villager has gossiped with five other villagers about a (and the gossip is strong enough(greater than 30)), an iron golem will try to spawn within a 16x6x16 area around the villager who originally spread the gossip. if that spot is obstructed the spawn will fail, but if it succeeds each of those gossip values are set to negative.

Each piece of gossip has a type, a target, and a strength or "value". For gossips the target is the villager who came up with the gossip. For reputation gossips, the target is the player who caused the gossip. If a piece of gossip would be generated in or spread to a villager, but the villager already has a piece of gossip with the same type and target, the existing gossip's strength will be increased instead. If the gossip has a high strength then villagers will be more likely to act on the gossip over other types of gossip. For example, if a villager has a gossip value of 30 or higher and another villager has a  gossip value of 10–29 (and the iron golem gossip has been spread to at least five other villagers), the  gossip will be prioritized over the  gossip and an iron golem will spawn instead of villager trade prices decreasing. This effect also seems to decrease the competing gossip's value, sometimes to negative.

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 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.

Even when is set to, villagers that are killed with any of the available items above will not drop them once they are killed.

Any items in these slots are lost if a villager becomes a zombie villager; a zombie villager has no inventory slots.

If is , villagers will not pick up items.

A dispenser can be used, if adjacent to a villager, to place armor on it. While not visible in most cases (other than pumpkins and mob heads) the equipment will be fully functional; for example, the Thorns enchantment will hurt zombies that attack a villager with a piece of armor enchanted with the Thorns enchantment equipped.

Sharing food
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.

Farming
Adult and baby brown-robed villagers or villagers wearing a straw hat 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 the X and Z coordinates and up to 1 away in the Y coordinate (a 31×31×3 area total).
 * If a brown-robed villager or villager with straw hat 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 or villager with straw hat 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 is , villagers will not be able to farm.

Baby villager behavior


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. They tend to group and chase one another around the village as if playing tag. They also jump on beds.

Baby villagers will give gifts of poppies or seeds to players who have the effect.

Baby villagers $$ have a slightly bigger head than in Java Edition and Legacy Console Edition; this also can be seen in other baby mobs in the game as well..

Zombies
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. 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, though the latter will not attack them.

Drowned will chase and attack villagers in the same way zombies will, and villagers will run from drowned in the same way they run from zombies. Drowned can also convert villagers to zombie villagers, even when attacking from a distance with a trident.

Lightning
When lightning strikes within 3–4 blocks of a villager, it will turn into a witch.

Raids
During a raid, villagers will run away from illagers and run to the nearest house, similar to a zombie siege. For a villager to hide, the house must have a door.

Before the first raid wave, villagers will also rush to ring the bells in the center of the village if they are close enough to warn the other villagers of an incoming raid before going into their house.

A villager will often stay in the house it ran to, but may exit its house occasionally. The player will still be able to trade with villagers during the raid. On random occasions the villager will display water particles as if sweating.

Once the player gains the Hero of the Village status after defeating a raid, villagers will lower their trade prices and throw gifts to the player relating to their profession. For a list of items they can gift, see the table below.

Breeding


Villagers will mate depending on the number of valid beds. If "willing" (see below), villagers will mate as long as the population is less than 35% (Bedrock Edition: 100%) of valid beds, rounded down. All baby villagers are initially unemployed, they reproduce as long as there is beds available in the limits of the village, you should build small houses with beds, close to the "roads", if they are willing they would reproduce.

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.

Willingness
Additionally, villagers must be "willing" in order to breed. After mating, they will no longer be willing, and must be made willing again.

As of the 1.14 update villagers now need to have enough beds for the baby villagers to spawn

Villagers may become willing when 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. Green particles will appear if the villager becomes willing by trading. This will not cause them to immediately seek out a mate, however.

Villagers can also become willing by having either 3 bread, 12 carrots, 12 potatoes, or 12 beetroots in one stack in their inventory. Any villager with an excess of food (usually farmers) will throw food to other villagers, allowing them to pick it up and obtain enough food to become willing. The player can also throw bread, carrots, beetroots, or potatoes at the villagers themselves to encourage breeding. Villagers will consume the required food upon becoming willing.

Professions
Each villager can have a profession, which can be identified by their clothing as well as by the title at the top of the trading interface. A villager can choose their profession by claiming a job site block. A job site block can only be claimed if it isn't already claimed by another villager and if they are inside a village boundary with at least 1 bed. If their job site block is removed, they will either change to another profession or become unemployed. When they go to work, they use their daily schedule to get to their claimed job site block. Some professions like farmers, librarians, and nitwits can do more jobs, as farmers plant crops, librarians can inspect bookshelves, and nitwit sleep during daytime.

A villager cannot change into a nitwit.

Novice-level villagers can lose their profession and change into unemployed.

Nitwit and unemployed baby villagers cannot change profession.

Unemployed adults will actively seek for an unclaimed job site block and change into the corresponding profession. Nitwit villagers sometimes seek for an unclaimed bed to sleep during the day.

Below is a table listing the various professions, along with the specific job site block that each profession requires.

Nitwit
"It started because players could summon villagers without a career by using commands: it was the only way to get villagers with green robes. Whenever we discover we have a bug which is used by the community we just see it as 'undefined behaviour' - and 'fix' it by making it a feature. In this case we just needed a profession for the green-robed villager. I don't remember what name we came up with first - I think it was 'unemployed' or something, but it doesn't really fit in the world, because I don't really think the other villagers are employed by anyone either. So I think the next suggestion was 'village idiot' but I thought 'nitwit' was a more fun name."

- Jeb about the Nitwit

The Nitwit villager is a villager that wears a green robe and cannot be traded with.

Appearance
Villagers and zombie villagers have seven skin types corresponding to the biome they spawn in. Their appearance also varies based on their profession and their five tiers. They show which trade tier they have unlocked by a badge of a varying material on their belt. A new tier is obtained every time a player trades with a villager and the badge appears as stone, then iron, gold, emerald and finally diamond. In Bedrock Edition villagers only have three badge tiers: iron, gold, and diamond.

Villagers have different outfits depending on the biome where they spawned, which are:


 * Desert outfit: desert and badlands biome and variants
 * Savanna outfit: savanna biome and variants
 * Taiga outfit: taiga, giant tree taiga, and mountains biome and variants
 * Snow outfit: any snowy biomes (including frozen river and snowy beach) and excluding frozen ocean and variants
 * Swamp outfit: swamp biome and variants
 * Jungle outfit: jungle biome variants (including bamboo jungle)
 * Plains outfit: plains and all other biomes not listed above.

Villagers have 15 professions, which are as follows: When spawned using spawn eggs or commands, adult villagers have a $1/15$ chance to spawn as 1 of 15 available professions, while baby villagers have a higher chance to spawn as unemployed. Villagers spawned from a village have a small chance to spawn as a nitwit, otherwise, they spawn as jobless.
 * Farmer (straw hat)
 * Fisherman (fisher hat)
 * Shepherd (brown hat with white apron)
 * Fletcher (hat with feather and quiver on the back)
 * Cleric (purple apron and creeper cloak)
 * Weaponsmith (pirate eyepatch and black apron)
 * Armorer (welding mask)
 * Toolsmith (black apron)
 * Librarian (eyeglasses with book as a hat)
 * Cartographer (golden monocle)
 * Leatherworker (brown apron and brown gloves)
 * Butcher (red headband and white apron)
 * Stone Mason/Mason (black apron and black gloves)
 * Nitwit (green coated)
 * Unemployed (no overlay)

Trading


"Right click on a villager and you can trade with them, offering them emeralds in exchange for better equipment, maps to notable treasures or food. Unless you are trying to trade with a nitwit, of course, in which case you’re going to get squat. Who’s the nitwit now?"

- Marsh Davies

The trading system is a gameplay mechanic that allows players to trade emeralds for items and vice-versa with villagers. Their trades can be good or bad, depending on what the cost is and what items the player might get. Trading is only available for adult villagers; the player cannot trade with baby villagers or the nitwit villager.

Right-clicking a villager will allow a player to trade with them, and display their career. Villagers will make offers based on their profession and career, and will only make trades based on whatever offers they are making. Different offers may be viewed by pressing the left and right buttons next to the currently displayed offer. All offers involve emerald as a currency, and some item pertinent to the villager's profession and career. Trading allows the acquisition of rare items that would otherwise be fairly difficult to obtain, such as enchanted diamond armor. The trading mechanic allows players to get bottle o' enchanting in survival mode. When villagers get a new trade, pink particles and green cross particles appear.

After trading a new offer once, the villager will allow a new tier of offers. After 2-12 times an offer is repeated, the villager will lock the trade offer. That is, the villager will no longer offer this trade. When this happens, the player will have to use another new trade offer in the villager's window once (or several times if it is already used once), and then wait for a short time. If green particles appear, all trades unlock. That is, the villager will start offering all trades. There is a maximum number of tiers each villager can possess, varying by career. Once the villager has unlocked all tiers, it will not open any new ones. However, players will still be able to renew all offers by trading.

Trade offering
As of Java Edition and Bedrock Edition when a player is holding an item near a villager who wants that item, the villager will hold up an item it offers in trade for it. For example, if a villager will buy 20 wheat for one emerald and the player is holding wheat, the villager will hold up an emerald, offering it to the player. If the villager has more than one trade for an item, it will cycle through the trades, offering a different item every few seconds. This kind of trading interaction makes it easier to find villagers who offer a particular trade, but the player must still open the trading interface to complete the trade.

Regeneration
When a villager gives off particles from a new trade, they get 10 seconds of regeneration I, which gives them.

Commands or external editors can be used to give custom trades to villagers.

Economic trade
In Bedrock Edition and Java Edition, villagers have levels and require experience to unlock the next tiers of trade; level 1 is novice, level 2 is apprentice, level 3 is journeyman, level 4 is expert, and level 5 is master. They cannot resupply trades instantly and it can only be done using the command, however, villagers can resupply themselves by working more at their job site block. If villagers change their profession, their experience bar and locked trades still remain the same and is saved to their NBT data, ex: weaponsmith villager has empty iron axe supply, and change into shepherd, when they change again to weaponsmith, iron axe trades still locked. However once levelled up, the villager cannot change their profession.

Popularity
Villagers will increase their prices of trades if a player's popularity is low, (e.g from damaging villagers), and decrease it if their popularity is high (e.g from trading with multiple villagers).

Hero of the Village
When a player receives Hero of the Village, players will be instantly discounted on all items traded by villagers. They will also be showered with gifts, each villager throwing gifts related to their profession.

Entity data
Villagers have entity data associated with them that contain various properties of the mob.

Trivia

 * The villagers were inspired by the shopkeepers in Dungeon Master 2.
 * Originally, the mobs populating villages were to be pigmen.
 * Villagers tend to often cram into houses that are in the southern-eastern area of their village.
 * Name tags used on villagers will always name the villager instead of opening the trading interface.
 * After a zombie villager is cured, the villager gets Nausea for 10 seconds (indicated by the purple status effect particles).
 * When a villager is in love mode, it walks very slowly. However, when a villager runs indoors as the night falls, it runs extremely fast, even faster than the player's sprinting speed.
 * Villagers can breed in the End dimension. They can claim and sleep in beds during Overworld nights. Unlike for players in the End or Nether, this will not cause the beds to explode. Villages form and their villagers breed as usual like in the other dimensions once all villagers have claimed a bed.
 * The Java Edition 1.6.1 release poster showed a blue-robed villager in the background. Such a villager has never been seen in-game. This texture was taken from the Tinkers' Construct mod.
 * The priest, librarian and nitwit villagers have an unused hood in their textures.
 * $$, an emerald will appear above a villager while opening the trading GUI.
 * Villagers run away from vindicators, evokers, pillagers, ravagers vex, zombies, husks, drowned, and zombie villagers.
 * Villagers can wear armor but only using the command or dispenser, and the armor will not appear.
 * The new villager skins added in the Village and Pillage update were inspired by 2018 fashion shows, such as Gucci's.

April fools
On April 1, 2014, Mojang announced that villagers have taken over the skin servers and content delivery networks (CDN) as an April Fools joke. This caused players's current skin to turn into villager skins, and caused users to be unable to change their skins unless modifying the launcher .json file. Different career villager skins were used, including the then-unused nitwit villager (green robe).

Many of the sounds were also changed, supposedly by the villagers. They seem to be similar to a villager talking (with words, rather than their normal sounds). The in-game music has also been altered to include villager like noises, and also features a villager version of the "Game of Thrones" theme on the title screen. The sounds originate from the sound resource pack created by Element Animation, titled The Element Animation Villager Sound Resource Pack (T.E.A.V.S.R.P.), which is based on the villagers appearing in their fan videos. The villagers were voiced by Dan Lloyd, Director of Element Animation.

The skins and the sounds were reverted to the way they were before on April 2, 2014. However, this update cannot be activated by setting the computer's date to April 1, 2014.

Bedrock and Legacy Console Editions are not affected from this April fools' Joke.