Villager

A Villager, also known by many players as a Testificate, is a passive NPC (Non-Player Character) that spawns and moves about in NPC Villages. Their characteristic look is dominated by their large, bald heads, green eyes, uni-brows, and long, protruding noses. They spawn around the villages and inside the buildings. They spawn at their respective buildings corresponding to the role they have.

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 attack 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 therefore able to go in and out of houses. Villagers will hide in houses during the night, rain, or when chased by Zombies.

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

Villagers will run away from Zombies, which can attack the Villagers. Sieges can occur between these mobs, and the Villager's only 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.

When Villagers are near an Iron Golem, they will stop and stare at it. The Iron Golems sometimes give roses to the Villagers, symbolizing the friendly relationship between the Villagers and Iron Golems.

Mating and Population
Villagers will mate depending on available housing. A "house" is defined as a wooden door that has an "inside" and an "outside". The "inside" is the side of the door which has more "roof" than the other. A block counts as being part of the "roof" when it is within 5 blocks of the door, its topside is exposed to sunlight during the day, and its bottom side is higher than the door's bottom side. Notice that a door is not a "house" without a roof, or with equal amount of roof on both sides. A house is initiated by a nearby villager (up to 16 blocks away horizontally along both axis, and up to 4 blocks vertically), and then either added to an existing or a new village. Sometimes the Villager AI doesn't behave as expected until the game is restarted.Lots of clarification needed.

If there is a well-lit nearby cave that villagers can and do easily fall into, their population will explode to accommodate the space, and they can become very difficult to get rid of.

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; 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. The Villager's profession does not give them unique differences from each other, however, other than their starting spawn.

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

History
Villagers were first introduced in Beta 1.9 Pre-release 1. They had the same AI programing as a Chicken and had the name "TESTIFICATE" over their heads the same way player names are applied in Multiplayer. The names were removed in 1.9 Pre-release 2.

As of 1.1, the original Farmer NPC can be spawned in Creative mode by using Spawn Eggs. The other NPC variations may be available in the future.

As of 12w05a, Villagers can open and close doors, go inside at night, and can detect houses.

As of 12w06a, Villagers can socialize with each other and passive mobs, are attacked by and run away from Zombies, and go inside when it rains.

As of 12w07a, Villagers will repopulate NPC villages by the number of houses there are, and their children sprint.

In 12w08a, Iron Golems were added to protect Villagers, by attacking any hostile mob near them or a mob that has attacked a nearby Villager (including the player). They only spawn naturally in villages, but can also be crafted by players (similarly to Snow Golems).

Future

 * It is noted that there will be a trading system between the players and Villagers. Also there is a file called trade in the minecraft jar.
 * Mojang also mentioned that they are currently focusing on Villagers and their textures.

Trivia

 * Testificate breeding results in random types, not depending on the couple.
 * Due to their peculiar look, Villagers have been ridiculed by the fanbase, sometimes comparing them to Squidward from SpongeBob SquarePants or Bert from Sesame Street. Notch himself agreed they look like "Caveman Squidwards".
 * Since the Villager's 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.
 * Villager's arms are implied to be jointed, with two parts each to create folded arms. Another likely implication is that the arms are tucked inside the sleeves, so that the sleeves touch.
 * It has been proven that Villagers can climb ladders if they are in their path, like other mobs.
 * Before Snapshot 12w05a, when Villagers did not have the ability to detect houses, Villagers would often wander away from villages.
 * Villagers, along with Snow Golems and Squid, 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 villagers will break into player's houses because of how they can open doors. This can result in them killing you by opening the door at night when there's a hostile mob outside.