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's done by right-clicking a villager in the PC version of Minecraft. Baby Villagers and Nitwits are not able to trade.
How To Trade
Each villager starts with a single option to trade for something. For this explanation, they will be referred to as "trade agreements," or simply "agreements." Each trade agreement can be done a certain 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).
If you trade with a villager as much as possible you will begin to unlock new trades depending on how high the villager's level is. 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.
Wandering Traders were added in 1.14 in the Village & Pillage Update. They offer random items such as ice, coral, saplings, etcetera, for a price of 1-3 emeralds.
- Main article: Reputation
A villager will "like" a player more, the more times they trade with each other. This is useful for two purposes: to stop the town's Iron Golems from attacking a player, and to make villagers offer discounts. 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 when done indoors when iron golems are present and the villagers are angry with a player.
- In the PS3 version, enchanted weapons cannot be traded to a villager, only ones without enchantments.
- Trading was initially impossible in Minecraft: Windows 10 Edition.
- In the PS3 version, clerics will sell Eyes of Ender instead of Ender Pearls.
- The trading system of Wandering Traders is entirely different from the normal villagers. As they will only sell items and will not buy anything.
- The price of emeralds on items in the Bedrock Edition seems to be cheaper than in the Java version.