Villager

A Villager (often called a Testificate, due to a temporary feature in Beta 1.9 Pre-Release) is a passive NPC (Non-Player Character) that spawns and moves about in NPC Villages. They spawn around the villages and inside the buildings. They spawn at their respective buildings corresponding to the role they have.

Appearance
Their characteristic look is dominated by their large, bald heads, green eyes, unibrows, and long, protruding noses. Villager's arms are implied to be jointed, with two parts each to create folded arms. The arms are tucked inside the sleeves, with the sleeves touching at the seam in the middle.

There are different types, distinguished by the color of their robes, which signify their role in the community. There are 6 unique skins for the Villagers which are found in the minecraft.jar file, but one is not used in the game.

Behavior
Villagers will randomly look at the player, and wander the area of the village. They do not counterattack if attacked, but they will be knocked back. When attacked, they will not run away. If the player does happen to kill one, they drop nothing, and others will do nothing about it, though nearby Iron Golems will attack the player.

Villagers have the ability to utilize doors and ladders, therefore able to go in and out of houses. Villagers will hide in houses during the night, rain, or when chased by Zombies. Villagers also will sometimes stop and appear to read signs, though this is rare, another rare instance is if you throw down a item in front of a villager he will look at it.

Villagers seem to favor well lit conditions over dimly lit ones, seemingly due to the lower chance of zombie spawning. Villagers favor houses over well lit areas, even if the house is completely unlit. This is probably due to the fact that houses are assumed to be sufficiently lit.

Villagers will run away from Zombies, which can attack the Villagers. Sieges can occur between these mobs, and the Villager's only "natural" defense are the Iron Golems, which protect Villagers from nearby mobs.

The Villagers will "socialize" with each other and passive mobs. This involves two Villagers simply facing each other. Villagers can socialize with the player as well, if they approach and stand still (they will start moving their heads in a bobbing fashion). Sometimes if three villagers are "socializing" and the player approaches them, one will push the player away. On some occasions, Villagers will gather in a large group in one point in a village, seemingly without any cause. They are also attracted to pumpkins and doors. When Villagers are near an Iron Golem, they will stop and stare at it. The Iron Golems sometimes give roses to the child Villagers, symbolizing the friendly relationship between the Villagers and Iron Golems and referencing to the inspiration of Iron Golems.

When trapped, Villagers will try to find the easiest exit, such as when trapped in a room with no roof and 2 high walls and a Bed next to a wall, it will jump on the Bed in an attempt to escape. In other instances, Villagers will try to jump over obstacles, regardless of height, similarly to Pigs.

Mating and population
Villagers will mate depending on the number of valid doors. A valid door is any door (within the city radius) where the number of "outside" spaces within 5 blocks (in a straight line) on one side of the door is not the same as the number of "outside" spaces within 5 blocks on the other side of the door. A space is considered to be "outside" if it is hit by the sun during the day, i.e. it is transparent, and has nothing but transparent blocks above it all the way to the sky. Notice that a door is not a valid door without a roof on one side, or with equal amount of roof on both sides. Sometimes the Villager AI (such as mating and housing) doesn't behave as expected until the game is restarted, (As in save and quit, then reload your world).

Once housing has been established, Villagers will then mate until the number of adult Villagers equals 0.35 times the number of doors. Any remaining children will grow up as usual, resulting in a total number of adult Villagers somewhere above one third of the number of nearby wooden doors. The type of Villager that the child is doesn't depend on what type the parents are, e.g., two farmer Villagers can have a child that is any of the occupations. Unlike other breed-able mobs, the parents and child have no personal interactions other than socializing.

Villager children will sprint about, entering and leaving houses at will. The Villager children will also chase each other around the village to simulate that they are playing tag. These children will sometimes stop sprinting to stare at an Iron Golem. If the Iron Golem is holding a rose, the children will cautiously take the flower from its hands. Although children look smaller than adult Villagers, their hitbox is the same size.

Professions
Each Villager's profession can be identified by its clothing.

(Note that all Villagers have brown clothing under their robes/aprons.)

*Note: Green Villagers do not spawn naturally.

Trading
See Trading

Future

 * Mojang also mentioned that they are currently focusing on Villagers and their textures.

Bugs

 * As of 1.2.5 a glitch exists where setting the difficulty to peaceful will despawn all the villagers in the nearest village to you. This effectively kills the village as they do not respawn.
 * In 12w21a reloading the world will make all villager professions farmers.
 * Spawning Zombie Pigmen in Creative mode next to a villager will cause the villager to run away, but the Zombie Pigmen are not aggressive towards villagers.
 * As of 1.2.5 middle clicking a villager (with the item select button) in creative will give you bedrock.

Trivia

 * Villager breeding results in random types, not depending on the couple.
 * Due to their peculiar look, Villagers have been compared to Squidward from SpongeBob SquarePants or Bert from Sesame Street. Notch himself agreed they look like "Caveman Squidwards".
 * Since the Villagers introduction, there has been a texture in the game files indicating a standard Villager type due to their filename. However, this role seems to be filled by the Farmer type instead, with no Villager of this type ever spawning.
 * A texture in the main mob directory of Minecraft appears to be the default character texture ("Steve") reoriented to be a Villager texture. As is expected, applying it to the current Villager model produces a very broken look, as seen above.
 * Villagers can climb ladders if they are in their path, like other mobs.
 * Villagers, Squids and Snow Golems are the only mobs in the game that don't have any sound effects.
 * Sometimes when there is a zombie outside, a villager might still open the door resulting in a "suicide".
 * Sometimes, when children are playing tag, a child may grow up and still be playing tag until the villagers stop for a break. The adult will then continue with a normal life.
 * It was originally promised that the villagers would be pig men.