Trading is an interaction between the player and villagers, which was added in the 1.3.1 update for PCs and added in the 1.0.4 update for Minecraft: Pocket Edition. It is done by right-clicking a villager in the PC version of Minecraft. Baby villagers are not able to trade.
How To trade
Each villager starts out with a single option to trade for something. For the purposes of this explanation, they will be referred to as "trade agreements," or simply "agreements." Each trade agreement can be done a number of times before the villager no longer wants to honor it. This is usually five times, but may vary. Completing the first trade agreement and then closing the trade window or interface, will cause the villager to enter a "thinking" mode, and give the villager an increased reputation with a player (reputation further explained below).
A villager can have up to five trade agreements at one time, though it can replace old ones with new ones after the fifth. The only way to unlock more agreements is to trade with the villager, completing at least one agreement each time. Once five trade agreements have been reached, continuing to trade the final agreement will still reset the other agreements, allowing more trading, but also have a chance of replacing the current agreements with yet another new agreement.
Cartographer villagers were added in The Exploration Update. Players can trade with these cartographers who are willing to trade an Exploration Map (woodland or ocean) for a combination of emeralds and a Compass.
In multiplayer servers with NPC villagers built-in to villages, players may act as highwaymen, or robbers, and kill players they believe may have just traded a villager for emeralds.
- Main article: Reputation
A villager will "like" a player more, the more times they trade with each other. This is useful for only one purpose: to stop the town's Iron Golems from attacking a player. Golems usually only become hostile when the villagers are angry because they were recently attacked by a player. Alternatively, a player may escape the village and wait for a while before returning. Hostile iron golems will eventually forgive/forget a player. Trading is usually difficult unless done indoors when iron golems are present and the villagers are angry with a player.