The first image of the trading system released by Jeb. The currency item (later updated to the Emerald) can be seen in the inventory.
The Trading system is a gameplay mechanic that allows Players to trade Emeralds for Items (and vice-versa) with NPC Villagers.
Information
As of 12w21a, right-clicking a villager will allow a player to trade with them. Villagers will make offers based on their profession, 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. Most offers involve Emerald as a currency, and some item pertinent to the villager's profession.
A villager will never offer to buy/sell the same item at different prices or quantities (for example, no villager will offer to buy either 16 raw pork or 17 raw pork: there can only be one offer to buy raw pork). However, the quantities and prices may vary from villager to villager, and a villager's own quantities/prices may change when they generate new offers.
All villagers initially have only one offer to make. They can generate new offers when the last offer available (rightmost on their list of offers) has been traded at least once. Note that the trading GUI must be closed before a villager will generate a new offer. When they do, they become surrounded with purple particles for a moment. New offers may involve items a villager was already buying/selling: in this case, the newly generated offer will overwrite the previous one, allowing a villager's prices to change. Although there is likely no maximum limit on the number of offers an individual villager can make, they can only have one offer per each item they can trade. In addition, when a villager already has many offers, there is a high probability that a newly generated offer will be of an item they already offer: thus the old offer will be overwritten, and there will not be any new offer slot added to the villager.
Right clicking on a villager pauses that villager's pathfinding and opens up the trading window.
Charcoal can be sold as coal to blacksmiths and butchers.
You can not trade with Child Villagers.
Possible Offers
A chart with 55 observed offers from each villager type. This is not a comprehensive chart, but it may give an idea of how common or rare some offers are.
The following table lists the minimum and maximum offers that a Villager will make when buying and selling items.
Farmer
| Buys | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Wheat | 18-21 | 1 | 0.9 |
| Wool | 14-21 | 1 | 0.5 |
| Raw Chicken | 14-17 | 1 | 0.5 |
| Cooked Fish | 9-12 | 1 | 0.4 |
| Gold Ingot | 8-9 | 1 | 0.0044%[note 2] |
| Sells | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Bread | 3-4 | 1 | 0.9 |
| Melon Slice | 5-8 | 1 | 0.3 |
| Apple | 5-8 | 1 | 0.3 |
| Cookie | 8-10 | 1 | 0.3 |
| Shears | 1 | 3 | 0.3 |
| Flint and Steel | 1 | 3 | 0.3 |
| Cooked Chicken | 7-8 | 1 | 0.3 |
| Arrow | 5 | 1 | 0.5 |
| Flint | 2-3 | 10 Gravel and 1 Emerald |
0.5 |
Librarian
| Buys | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Paper | 19-29 | 1 | 0.8 |
| Book | 12-14 | 1 | 0.8 |
| Written Book | 1 | 1 | 1.3[note 3] |
| Gold Ingot | 8-9 | 1 | 0%[note 2][note 3] |
| Sells | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Bookshelf | 1 | 3 | 0.8 |
| Glass | 4-5 | 1 | 0.2 |
| Compass | 1 | 10-11 | 0.2 |
| Clock | 1 | 10-11 | 0.2 |
Priest
| Buys | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Gold Ingot | 8-9 | 1 | 10.12%[note 2] |
| Sells | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Eye of Ender | 1 | 7-10 | 0.3 |
| Bottle o' Enchanting | 2-4 | 1 | 0.2 |
| Redstone | 2-4 | 1 | 0.4 |
| Glowstone | 2-3 | 1 | 0.3 |
| Enchants [note 4] | Price in Emeralds | Probability[note 1] |
|---|---|---|
| Iron Sword | 2-4 | 0.1 |
| Iron Pickaxe | 2-4 | 0.1 |
| Iron Axe | 2-4 | 0.1 |
| Diamond Sword | 2-4 | 0.1 |
| Diamond Pickaxe | 2-4 | 0.1 |
| Diamond Axe | 2-4 | 0.1 |
| Iron Chestplate | 2-4 | 0.1 |
| Diamond Chestplate | 2-4 | 0.1 |
Blacksmith
| Buys | Quantity | Price in Emeralds | Price per Unit in Emeralds | Probability[note 1] |
|---|---|---|---|---|
| Coal | 16-23 | 1 | 0.0435 - 0.0625 | 0.7 |
| Iron Ingot | 8-9 | 1 | 0.111 - 0.125 | 0.5 |
| Gold Ingot | 8-9 | 1 | 0.111 - 0.125 | 0.5 |
| Diamond | 4-5 | 1 | 0.2 - 0.25 | 0.5 |
| Gold Ingot | 8-9 | 1 | 0.111 - 0.125 | 0.0052%[note 2] |
| Sells | Quantity | Price in Emeralds | Price per Unit Ingredient[note 5] | Probability[note 1] |
|---|---|---|---|---|
| Iron Sword | 1 | 7-10 | 3.5 - 5 | 0.5 |
| Iron Axe | 1 | 6-7 | 2 - 2.33 | 0.3 |
| Iron Pickaxe | 1 | 7-8 | 2.33 - 2.67 | 0.5 |
| Iron Shovel | 1 | 4-5 | 4-5 | 0.2 |
| Iron Hoe | 1 | 4-5 | 2 - 2.5 | 0.2 |
| Diamond Sword | 1 | 12-13 | 6 - 6.5 | 0.5 |
| Diamond Axe | 1 | 9-11 | 3 - 3.67 | 0.3 |
| Diamond Pickaxe | 1 | 10-11 | 3.33 - 3.67 | 0.5 |
| Diamond Shovel | 1 | 7 | 7 | 0.2 |
| Diamond Hoe | 1 | 7 | 3.5 | 0.2 |
| Iron Helmet | 1 | 4-5 | 0.8 - 1 | 0.2 |
| Iron Chestplate | 1 | 10-13 | 1.25 - 1.625 | 0.2 |
| Iron Leggings | 1 | 8-9 | 1.14 - 1.29 | 0.2 |
| Iron Boots | 1 | 4-5 | 1 - 1.25 | 0.2 |
| Diamond Helmet | 1 | 7 | 1.4 | 0.2 |
| Diamond Chestplate | 1 | 16-18 | 2 - 2.25 | 0.2 |
| Diamond Leggings | 1 | 11-13 | 1.57 - 1.86 | 0.2 |
| Diamond Boots | 1 | 7 | 1.75 | 0.2 |
| Chainmail Helmet | 1 | 5-6 | 1-1.2 | 0.1 |
| Chainmail Chestplate | 1 | 11-14 | 1.375-1.75 | 0.1 |
| Chainmail Leggings | 1 | 9-10 | 1.29-1.43 | 0.1 |
| Chainmail Boots | 1 | 5-6 | 1.25 - 1.5 | 0.1 |
Butcher
| Buys | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Coal | 16-23 | 1 | 0.7 |
| Raw Porkchop | 14-17 | 1 | 0.5 |
| Raw Beef | 14-17 | 1 | 0.5 |
| Gold Ingot | 8-9 | 1 | 0.794%[note 2] |
| Sells | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Saddle | 1 | 6-7 | 0.1 |
| Leather Cap | 1 | 2-3 | 0.3 |
| Leather Tunic | 1 | 4 | 0.3 |
| Leather Pants | 1 | 2-3 | 0.3 |
| Leather Boots | 1 | 2-3 | 0.3 |
| Cooked Porkchop | 6-7 | 1 | 0.3 |
| Steak | 6-7 | 1 | 0.3 |
Villager (Green Clothes)
Note: The green Villager is only obtainable using server commands or mods. It does not spawn naturally, even using a spawn egg.
| Buys | Quantity | Price in Emeralds | Probability[note 1] |
|---|---|---|---|
| Gold Ingot | 8-9 | 1 | 100%[note 2] |
Notes
- ↑ a b c d e f g h i j k l Most offers have a probability value defined in the code. The larger the number is, the more likely the offer is. This is not exactly the probability of getting the offer: the game first compiles a list of potential offers, and the probability is used to determine whether the offer is included in this list. Then one offer is selected from this list at random to be the actual new offer generated.
- ↑ a b c d e f Gold ingot offers do not have a specific probability in the code, except for one of the two blacksmith offers. If no potential offers are generated, then the game will default to an offer of gold ingots. Note that this offer is more likely when all other offers have a low probability. The percentage listed is the actual probability of getting that offer.
- ↑ a b The probability of a librarian requesting a written book is 1.3 in the code, even though this is larger than 1.0. Either way, it is equivalent to 1.0: written book is always a potential offer. This also means a librarian will never request gold ingots, until this bug is fixed.
- ↑ Priests will offer to enchant items for you. Every enchantment costs between 2-4 Emeralds, and requests the item to be enchanted in the first slot. Trading for an enchanted item in this manner repairs the item if it is damaged, allowing items to have infinite durability at the cost of emeralds. (This is probably a bug.) When creating the enchantment offer, the game uses a random enchantment level from 5-19. Priests will only offer to enchant Iron and Diamond tools and armor, specifically Chestplates, Pickaxes, Axes and Swords. For a listing of what enchantments will show up at these levels, see Enchantment Mechanics
- ↑ "Price per Unit Ingredient" is the equivalent price per diamond gem or iron ingot that you would be paying if you were buying the diamonds or iron and then crafting the resulting tool or armor yourself. In the case of chainmail armor, these numbers are given for a theoretical comparison only, since chainmail cannot be player-crafted. In the case of tools, sticks used in the crafting of tools are ignored in the calculation.
History
Before the Adventure Update, Notch once answered some questions about an idea he had, NPC Villages, where he revealed some thoughts about them:[1]
- If you treat the Villagers well (giving them items), they'll give you items back.
- If you treat the Villagers badly (attacking/killing them), they'll try to do the same to you (feature added with Iron Golems).
- Raiding chests will anger the owners of the town/chest and they will attack.
On May 21, 2012, Jeb released a screenshot of himself testing the Trading System.[2] The image shows a GUI with buying and selling areas. The bottom area allows the player to sell various items for currency, whereas the top area uses this currency to purchase items. A possible way to buy them would be to put these currencies in the left slot, where the chicken is, and you can scroll through items for the right slot to take the item you choose once you click on it. The player may use the arrow buttons to scroll through a Villager's inventory and select the desired item. Jeb also mentioned that this may be an end to non-renewable resources, supposedly as most can be bought for some price from NPCs. In the image, a red currency item can be seen that was later revealed in snapshot 12w21a as the Emerald.
An ore block can be seen in the background which was later revealed in snapshot 12w21a to be a new Emerald Ore.
With the implementation of the trading system, most or all resources become "renewable" since nonrenewable resources can be traded from Villagers.[3]
As of snapshot 12w22a, Priests no longer offer to buy Rotten Flesh or Eyes of Ender. Eyes of Ender are now sold by priests, and rotten flesh is not a trade at all.
Gallery
- Villagertradinggui.png
An edited image of the trading GUI with all items removed.
- Trading 12w22a.png
Priest offers to player to enchart (Bane of Arthropods I) his iron sword for two emeralds.
An image of the Emerald item, the currency used for trading.
Bugs
- Closing the trade window while items are in the trading slots destroys the items without dropping them.
- Priests enchanting items ignore durability, repairing the item in the process. (May not be a bug.)
- Farmers may be meant to sell arrows in quantities of 6-19, rather than just 5. However, the quantity range is backwards in the code, resulting in only 5 as a possible offer.
- The probability of a librarian buying a written book as a potential offer is greater than 1.0, meaning it will always be a potential offer. This means it is impossible for librarians to offer gold ingots.
Trivia
- Right-clicking on a villager right after a killing blow is dealt will result in the player trading with a dead villager. The trade goes through without any problems.
- Trading is currently the only legitimate way to get Chainmail Armor as well as Bottles O' Enchanting without creative mode.
- Gold Ingots are used as a fallback offer; any time a villager randomly selects none of its offers, it chooses to buy gold ingots instead. This is why gold is offered so rarely as a trade, and also why it is the Green Villager's only item.
References
See also
| Help | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Menu screens |
| ||||||||||||||||||
| Game customization | |||||||||||||||||||
| Editions |
| ||||||||||||||||||
| Miscellaneous | |||||||||||||||||||

