Trading (Minecraft)

For the mechanic used with piglins, see Bartering.
The trading system is a gameplay mechanic that allows players to trade principally emeralds for items and vice versa, with villagers and wandering traders.
== Mechanics ==
Pressing use on an adult villager with a profession, or on a wandering trader, opens a menu, allowing a player to trade with the villager or wandering trader. This action pauses any pathfinding the entity was doing. If the entity takes damage while trading, the trading menu closes. The same thing happens if they walk or are transported far enough away.
All transactions involve emeralds. Villagers buy or sell goods for emeralds, and wandering traders sell items for emeralds but do not buy items. Trading is the only legitimate method of acquiring the globe banner pattern, woodland explorer maps, and ocean explorer maps in Survival mode. It is also the only renewable way to obtain bells, diamond gear, lapis lazuli‌[BE only], bottles o' enchanting, glass, sand, red sand, coral blocks, and small dripleaves.
Villagers have five career levels that can be increased by trading with them. Each villager starts at the "novice" level. A villager's level can be seen in the trading menu. The badge they wear can also be identified: stone for a novice, iron for an apprentice, gold for a journeyman, emerald for an expert, and diamond for a master. Trading until the villager's trading bar gets full unlocks the next level of trades. When a player trades with a villager, both the villager and the player gain experience. All villager trades reward the player with 3–6 experience, plus an additional 5 experience if the villager levels up due to the trade. Trading with a wandering trader also rewards the player with some experience, although the trader does not have experience levels to gain. A villager levels up when its experience bar becomes full and gains up to two new trades, along with keeping their old ones. Additionally, a villager receives a Regeneration effect, and becomes surrounded by purple and green particles for ten seconds.
A villager's profession dictates the trading pool used to determine its trades. For example, villagers wearing straw hats are farmers, so their trades are based on the Farmer trade pool. Each profession unlocks a pre-defined and finite set of offers. Different professions are assigned to each villager based on their job-site block. This profession is indicated by their appearance and in the trading interface. Novice villagers who have not traded can lose their profession and change back into unemployed villagers if their claimed job site block is removed. Removing and then replacing a job site block can alter the trades offered, and a villager with no experience resets its trades every so often. Once a player trades with a villager, the villager keeps its profession forever and subsequently locks in the offered trades.
Villagers run out of stock after a certain number of trades, the exact number is different for each item and referenced in the tables below. When villagers work at their job site blocks, they activate their offers again, up to twice per day. In Bedrock Edition Villagers need to be linked to a bed to restock their trades, It's not necessary for them to sleep but required to have a bed nearby. When an offer is disabled, a red "X" appears in the trading interface, and the villager displays the same particle effect as an offer being created.
Villagers distinguish between data values, so damaged tools cannot be traded in place of fully repaired tools.‌[Bedrock Edition only] NBT data, however, is ignored, so the content of a written book does not matter. However, written books can no longer be sold to villagers, and no villagers currently buy any tools that have durability.
=== Economics ===
Permanent discounts (observed prices may be higher or lower due to other temporary factors) Above image is no longer accurate from 1.20.2(Java) and 1.20.30(Bedrock)
In Java Edition, villagers have a maximum of 10 trades. Each level unlocks a maximum of two new trades. If a level has a pool of more than two trades, the two offered trades are chosen randomly from the set.
In Bedrock Edition, villagers have 7–10 trade slots. Some slots with multiple possible trades display only one trade; for example, farmer villagers have 4 potential trades in their first trade slot, so each trade has a 1⁄4 chance to be chosen.
Each trade can be used a maximum number of times, after which the trade becomes disabled. Once trades are disabled, villagers must work at their corresponding job site block to resupply their trades.
The price of an item rises and falls depending on three factors. Items with a high price multiplier (0.2) are affected by these changes more than items with a low multiplier (0.05). All price fluctuations affect only the first item involved in trade; for example, for an initial trade of 32 sticks for 1 emerald, the price might be driven down to 1 stick or up to 64 sticks for 1 emerald, but never for 2 emeralds. Additionally, no quantity can go lower than 1 or higher than the stack size.
The first factor is demand. An item that was sold out gets a price increase for all players when resupplied. If a player does not trade for a higher-priced item, the price is reduced the next time the villager resupplies. Demand is tracked per item, not per villager, so a villager can offer a higher-priced trade for a single item while other items are cheaper. Trades that have a price multiplier of 0 are not affected by demand.
The second way to affect prices is the Hero of the Village effect, which temporarily reduces prices for the affected player depending on the level of the effect.
Finally, players get personal discounts or fines based on their reputation with that particular villager. A positive reputation is gained by curing zombie villagers (the villager that was cured gives a permanent discount much larger than the temporary discount in nearby villagers). To cure a zombie villager, a player must splash it with a splash potion or an arrow of Weakness and then feed it a golden apple. The permanent discount is capped at one cure, while the temporary discount is capped at 8 cures. In Java Edition, players can also gain negative reputation by hitting or killing villagers, and positive reputation by trading.
== Non-trading villagers ==
If the player attempts to trade with a non-trading villager in Java Edition, they grunt and shake their head.
=== Nitwit ===
A nitwit shaking its head.
Nitwits are green-coated villagers. They cannot gain a profession.
While they can be used for breeding, it is not possible to get a baby nitwit by breeding, even if using two nitwits as adults.
=== Unemployed villager ===
An unemployed villager shaking its head.
Villagers without a job overlay cannot trade. They only wear their biome outfits. An unemployed villager gains a profession by claiming an unclaimed job site block. For example, an unclaimed cartography table converts an unemployed villager into a cartographer when the villager claims it, and both the villager and the table emit green particles. An inaccessible (or destroyed) job site block causes the connected villager to lose its profession, but that does not affect the player's popularity in the village.
== Java Edition offers ==
For the trades before 1.8, see Trading/Before 1.8.
For the 1.13 trades, see Trading/Before Village & Pillage.
For the experimental rebalanced trades, see Villager Trade Rebalance.
The villager pictured on the right is from the plains biome. To see villager professions dressed for other biomes, see Villagers § Professions.
Starting from Novice, at each level two more trades become available, unless there is only one trade within that level. If there are more than two possible trades, two are randomly selected.
see Villager/Jobs
== History ==
see Trading/Minecraft/History
== Trivia ==
* While diamonds are not renewable, their products (armor, tools, and weapons) are renewable via trading.
Category:Village (Minecraft)
Category:Villager (Minecraft)
Category:Wandering Trader (Minecraft)
Category:Game Mechanic
Category:Minecraft
Category:1.3.1 Version
Category:Snapshot 12w21a