2187
ediciones
Cambios
Página creada con «{{Construcción}} thumb|352px|El interfaz de intercambio mostrando un intercambio de 28 unidades de [[papel por 1 esmeralda.]] El...»
{{Construcción}}
[[File:Trading paper clean GUI.png|thumb|352px|El interfaz de intercambio mostrando un intercambio de 28 unidades de [[papel]] por 1 [[esmeralda]].]]
El sistema de '''intercambio''' es una mecánica del juego que permite al [[jugador]] intercambiar [[esmeralda]]s por [[objetos]] y viceversa con NPC [[aldeano]]s.
== Funcionalidad ==
Usando click derecho sobre un [[aldeano]] abrirá un interfaz que permitirá al jugador intercambiar con él. Los aldeanos harán ofertas basadas en su profesión, y solamente harán intercambios basados en las ofertas que ellos mismos hacen. Se pueden observar ofertas distintas si se va pulsando los botones de derecha e izquierda que se sitúan al lado de la oferta mostrada. Todas las ofertas incluyen [[esmeralda]]s como recurso, y algún objeto perteneciente a la profesión del aldeano. El intercambio permite la adquisición de objetos poco comunes que si fuera de otro modo sería realmente difícil de obtener, como la armadura de malla. También es e único modo de obtener los [[Frasco con Experiencia|frascos con experiencia]] en el modo supervivencia.
Un aldeano nunca ofrecerá para comprar/vender el mismo objeto a diferentes precios o cantidades (por ejemplo, un mismo aldeano no ofrecerá chuletas de cerdo crudas a por 16 esmeraldas y 17 esmeraldas a la vez, sólo puede haber una oferta para comprarlas). Sin embargo, las cantidades y precios pueden variar entre aldeanos, y las cantidades/precios pueden variar cuando se generan nuevas ofertas.
Todos los aldeanos tienen en un inicio solamente una oferta. Pueden generar nuevas ofertas cuando la última oferta se ha cumplido al menos una vez. Es importante que se cierre el interfaz de intercambio antes de que el aldeano genere una nueva oferta. Al hacerlo, los aldeanos se ven envueltos con partículas verdes y moradas por un momento. Las nuevas ofertas pueden involucrar objetos que un aldeano ya estaba ofreciendo para comprar/vender: es cuyo caso, la oferta que se genera posteriormente sobrescribirá la anterior, permitiendo que los precios del aldeanos varíen. Pese a eso no hay un límite del número de ofertas que un aldeano individual puede hacer, solamente pueden tener una oferta por cada tipo de objeto que puedan intercambiar. Además, cuando un aldeano ya tiene varias ofertas, hay una alta probabilidad de que una oferta recién generada sea sobre un objeto que ya se ha ofrecido: pese a que la oferta antigua se sobrescriba, y no haya ningún espacio de oferta nuevo que se añada al aldeano.
Los aldeanos desactivarán una oferta si se ha usado un número determinado de veces y no es la única disponible. La probabilidad de que una oferta se desactive es aleatoria, pero una oferta se debe cumplir al menos 3 veces antes de que pueda ser desactivada. Después de que una oferta se haya usado 13 veces, se desactivará en todo caso si se cierra el interfaz de intercambio después de cumplirla. Intercambiar la última oferta activará una nueva oferta.
Antes de la [[Pretty Scary Update]] (v1.4), era posible intercambiar más de 13 veces sobre una misma oferta porque las ofertas no se eliminaban hasta que se cerraba el interfaz. Esto significaba que podías cumplir una oferta tantas veces como tus espacios en el inventario te lo permitieran. Actualmente, los aldeanos pueden interrumpir un intercambio de un objeto en particular si las condiciones para la desactivación se han dado incluso si el interfaz sigue abierto. Esto puede causar comportamientos extraños en el inventario cuando el jugador usa shift+click durante el intercambio. Al principio parece que el inventario se ha completado, pero después los objetos vuelven a estar igual que antes. Cuando se cierra y reabre la ventana del intercambio, la oferta se mostrará, pero X rojas indicarán que ya no se encuentra disponible. Pese a eso, solamente se puede eliminar na oferta después de que se cierre el interfaz de intercambio: si intercambias ofertas múltiples antes dentro límite, solamente se eliminará el último intercambio. De este modo, una oferta con más de 13 usos se pueden mantener y el juego no comprueba las ofertas para desactivar hasta que la oferta se completa.
Además, si una oferta es la última que está disponible, nunca se desactiva cuando sus usos exceden 12. Puesto que ya no es la última oferta, puede que se elija para que se desactive. Cuando una oferta se desactiva, tiene el mismo efecto de partículas que cuando se crea una oferta.
Desafortunadamente, no se puede cambiar lo que un aldeano vende, por lo que habrá que intercambiar hasta que todos los objetos se desbloqueen.
== Posibles ofertas ==
[[File:Trading-Chart.png|thumb|325px|Carta de referencia de intercambios]]
La siguiente tabla lista el mínimo y máximo de ofertas que un aldeano hará cuando se compren y venda objetos.
{{-}}
=== Granjero ===
[[File:Farmer.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Compra
|-
! width="145px" | Objeto
! Catidad
! Precio en <br>[[esmeralda]]s
! Probabilidad<br>Valor<ref group="nota" name="probabilidad">La mayoría de las ofertas tienen una probabilidad definida en el código. Cuando más grande es el número, más probable es la oferta. Esta no es la probabilidad exacta de obtener la oferta: el juego pirmero compila una lista de ofertas potenciales, y la probabilidad se usa para determinar si la oferta se incluye en la lista. Luego una ofetra se selecciona de la lista aleatoriamente para ser la oferta actual.</ref>
! <br>Probabilidad actual<ref group="nota" name="probabilidadActual">La probabilidad actual de una oferta depende de los valores de probabilidad de todas las ofertas para el aldeano. Dichos valores se calculaban comprobando las probabilidades de todas las listas de ofertas potenciales.</ref>
! Prob. de ser la última oferta<ref group="nota" name="probabilidadDeúltima">Esta es la probabilidad que que la oferta mostrada sea la última de un aldeano cuando todas las opciones se extinguen. Las ofertas con probabilidades más altas de que se muestren al principio Offers with higher probabilities of being given are more likely to show up in the beginning of a villager's list of available trades, while rarer trades will be closer to last. For example, buying gold is frequently a villager's final trade offer, because it is rare for a villager to offer to buy gold. Only after many trades will buying gold be offered, so other offers will have taken the first spots on the villager's list of trade offers.</ref>
|-
| style="text-align:left" | {{ItemLink|Wheat}}
| 18 – 21
| 1
| 0.9
| 16.0271%
| 0.0005%
|-
| style="text-align:left" | {{BlockLink|Wool}}
| 14 – 21
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Raw Chicken}}
| 14 – 17
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Cooked Fish}}
| 9 – 12
| 1
| 0.4
| 6.4622%
| 0.0147%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold">Gold ingot offers do not have a probability value 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.</ref>
| 0.0044%
| 99.7591%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{ItemLink|Bread}}
| 3 – 4
| 1
| 0.9
| 16.0271%
| 0.0005%
|-
| style="text-align:left" | {{ItemLink|Melon}}
| 5 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Apple}}
| 5 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Cookie}}
| 8 – 10
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Shears}}
| 1
| 3
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Flint and Steel}}
| 1
| 3
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Cooked Chicken}}
| 7 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Arrow}}
| 9 – 12
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Flint}}
| 4 - 5
| 10 {{BlockLink|Gravel}} and<br>1 {{ItemLink|Emerald}}
| 0.5
| 8.2163%
| 0.0070%
|}
=== Librarian ===
[[File:Librarian.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{ItemLink|Paper}}
| 24 – 35
| 1
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Book}}
| 11 – 12
| 1
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Written Book}}
| 1
| 1
| 0.3
| 7.9476%
| 0.5154%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 0.2666%
| 83.9531%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{BlockLink|Bookshelf}}
| 1
| 3
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Enchanted Book}}<ref group="note" name="book>The enchantment is chosen randomly, with equal chance of any enchantment type occurring and equal chance to get any level of it, so higher-leveled enchantments are as likely to get as low-leveled enchantments. The price in emeralds depends on enchantment level only. The possible values are 5 – 19 emeralds for Lvl I, 8 – 32 for Lvl II, 11 – 45 for Lvl III, 14 – 58 for Lvl IV and 17 – 71 for Lvl V.</ref>
| 1
| 1 {{ItemLink|Book}} and<br>5 – 64 {{ItemLink|Emerald}}s
| 0.07
| 1.7573%
| 11.0006%
|-
| style="text-align:left" | {{BlockLink|Glass}}
| 4 – 5
| 1
| 0.2
| 5.1711%
| 1.4996%
|-
| style="text-align:left" | {{ItemLink|Compass}}
| 1
| 10 – 11
| 0.2
| 5.1711%
| 1.4996%
|-
| style="text-align:left" | {{ItemLink|Clock}}
| 1
| 10 – 11
| 0.2
| 5.1711%
| 1.4996%
|}
=== Priest ===
[[File:Priest.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 10.1246%
|}
{| class="wikitable" style="text-align:center"
! colspan="5" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Eye of Ender}}
| 1
| 7 – 10
| 0.3
| 13.8203%
|-
| style="text-align:left" | {{ItemLink|Bottle o' Enchanting}}
| 2 – 4
| 1
| 0.2
| 8.8493%
|-
| style="text-align:left" | {{ItemLink|Redstone}}
| 2 – 4
| 1
| 0.4
| 19.2692%
|-
| style="text-align:left" | {{BlockLink|Glowstone}}
| 2 – 3
| 1
| 0.3
| 13.8203%
|}
{| class="wikitable" style="text-align:center"
! colspan="4" | Enchants<ref group="note" name="enchant">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.
When creating the enchantment offer, the game uses a random enchantment level from 5 – 19. For a listing of what enchantments will show up at these levels, see [[Enchantment Mechanics]]</ref>
|-
! width="204px" | Item
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Iron Sword}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Pickaxe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Axe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Sword}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Pickaxe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Axe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Chestplate}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Chestplate}}
| 2 – 4
| 0.1
| 4.2645%
|}
=== Blacksmith ===
[[File:Blacksmith.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Buys
|-
! width="150px" | Item
! Quantity
! Price in<br>[[emerald]]s
! width="101px" | Price per Unit<br>in [[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Coal}} <ref group="note" name="coal">Villagers buy Charcoal as Coal in 1.7 versions, but not since snapshot 14w02a (1.8)</ref>
| 16 – 23
| 1
| 0.0435 - 0.0625
| 0.7
| 9.6382%
|-
| style="text-align:left" | {{ItemLink|Iron Ingot}}
| 8 – 9
| 1
| 0.111 - 0.125
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| 0.111 - 0.125
| 0.5
| 6.6817%<ref group="note" name="gold" /><ref group="note" name="smith">The blacksmith actually has two chances to offer to buy gold ingots. This is because it is an explicit offer a smith may ordinarily make (0.5 probability value, or 6.6765% chance), and it is also a default offer for all villagers (with a 0.0052% chance from a blacksmith). Note that, despite two chances to generate a gold ingot offer each time an offer is generated, a blacksmith will never have two separate offers to buy gold ingots in the trading interface, because the offers involve the same items.</ref>
|-
| style="text-align:left" | {{ItemLink|Diamond}}
| 4 – 5
| 1
| 0.2 - 0.3333
| 0.5
| 6.6765%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Price per Unit<br>Ingredient<ref group="note" name="perunit">"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.</ref>
! Probability<br>Value
! width="123px" | Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Iron Sword}}
| 1
| 7 – 10
| 3.5 - 5
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Iron Axe}}
| 1
| 6 – 7
| 2 - 2.33
| 0.3
| 3.8961%
|-
| style="text-align:left" | {{ItemLink|Iron Pickaxe}}
| 1
| 7 – 8
| 2.33 - 2.67
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Iron Shovel}}
| 1
| 4 – 5
| 4 – 5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Hoe}}
| 1
| 4 – 5
| 2 - 2.5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Sword}}
| 1
| 12 – 13
| 6 - 6.5
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Diamond Axe}}
| 1
| 9 – 11
| 3 - 3.67
| 0.3
| 3.8961%
|-
| style="text-align:left" | {{ItemLink|Diamond Pickaxe}}
| 1
| 10 – 11
| 3.33 - 3.67
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Diamond Shovel}}
| 1
| 7
| 7
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Hoe}}
| 1
| 7
| 3.5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Helmet}}
| 1
| 4 – 5
| 0.8 - 1
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Chestplate}}
| 1
| 10 – 13
| 1.25 - 1.625
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Leggings}}
| 1
| 8 – 9
| 1.14 - 1.29
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Boots}}
| 1
| 4 – 5
| 1 - 1.25
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Helmet}}
| 1
| 7
| 1.4
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Chestplate}}
| 1
| 16 – 18
| 2 - 2.25
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Leggings}}
| 1
| 11 – 13
| 1.57 - 1.86
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Boots}}
| 1
| 7
| 1.75
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Chainmail Helmet}}
| 1
| 5 – 6
| 1 – 1.2
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Chestplate}}
| 1
| 11 – 14
| 1.375 – 1.75
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Leggings}}
| 1
| 9 – 10
| 1.29 – 1.43
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Boots}}
| 1
| 5 – 6
| 1.25 - 1.5
| 0.1
| 1.2659%
|}
=== Butcher ===
[[File:Butcher.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Coal}} <ref group="note" name="coal">Villagers will buy Charcoal as Coal.</ref>
| 16 – 23
| 1
| 0.7
| 21.0549%
|-
| style="text-align:left" | {{ItemLink|Raw Porkchop}}
| 14 – 17
| 1
| 0.5
| 14.0096%
|-
| style="text-align:left" | {{ItemLink|Raw Beef}}
| 14 – 17
| 1
| 0.5
| 14.0096%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 0.794%
|}
{| class="wikitable" style="text-align:center"
! colspan="5" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Saddle}}
| 1
| 6 – 7
| 0.1
| 2.5177%
|-
| style="text-align:left" | {{ItemLink|Leather Cap}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Tunic}}
| 1
| 4
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Pants}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Boots}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Cooked Porkchop}}
| 6 – 7
| 1
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Steak}}
| 6 – 7
| 1
| 0.3
| 7.93571%
|}
===Generic Villager (green clothes) ===
''Note: The green villager is only obtainable using /summon, [[server commands]], [[mods]], or third-party map editors on version 1.7.6 or lower. In the first 1.8 snapshots when the new villager professions were added, its number was changed to -1. It doesn't spawn naturally, even when using a [[spawn egg]].''
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 100%
|}
=== Notes ===
<references group="note"/>
== Future ==
{{snapshot|section}}
In 14w02a, Villager trading has been revamped:
* Villagers now spawn with careers.
** Trades are now specific to career, and are unlocked in tiers
** Villager career is now displayed in trade GUI.
* Buying/selling ''any'' of the available options can unlock new tiers/reactivate available options. This is opposed to having to trade the last offer.
** An offer is guaranteed to reactivate available options (and unlock a tier, if some have not yet been unlocked) the ''first'' time it is traded. On subsequent attempts, it will only have a 20% chance of doing so.
* New offers will no longer rewrite old ones. New offers are appended to the end of the villager's list.
* Each tier consists of a defined set of trade offers, and the tiers are the same for any given career (see chart).
* When a trade has deactivated, the red X will appear immediately and prevent further trading, instead of having to close and reopen the trading window.
* Villagers now distinguish between damage values; so, different colors of wool CANNOT replace white wool, charcoal cannot be traded in place of coal, and damaged tools cannot be traded in place of fully repaired tools. NBT data, however, is still ignored, so the content of a written book does not matter.
* Trading now gives experience.
* ''All'' villagers in your world before 14w02a+ will retain their previous trade offers, but will gain the new trading mechanics.
Different careers are assigned to each Villager (viewable in the trading GUI). For example, brown-robed Villagers can be Fletchers or Fishermen; Blacksmiths can be Armorers or Weapon Smiths; etc. Every Villager spawns with Tier 1 of their given career, which range from 2-4 initial unlocked trades (i.e. all Shepherds will spawn with only two options, buying wool and selling shears).
Completing any trade offer with a Villager ''may'' unlock a subsequent tier of new offers and reactivate old ones. This is guaranteed the first time you trade a particular offer, and also has a 20% chance of occurring with subsequent trades to that offer.
The full list of careers and tiers is listed below:
=== Brown Robed Villager (Farmer) ===
[[File:Farmer.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Farmer
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="3" | 1
| {{ItemLink|Wheat}} || 18 - 22 || 1 || rowspan="3" | {{ItemLink|Bread}} || rowspan="3" | 1 || rowspan="3" | 2 - 4
|-
| {{ItemLink|Potato}} || 15 - 19 || 1
|-
| {{ItemLink|Carrot}} || 15 - 19 || 1
|-
! 2
| {{BlockLink|Pumpkin}} || 8 - 13 || 1 || {{ItemLink|Pumpkin Pie}} || 1 || 2 - 3
|-
! 3
| {{BlockLink|Melon}} || 7 - 12 || 1 || {{ItemLink|Apple}} || 1 || 5 <!-- Probably should be 5 - 7, but see MC-49666 -->
|-
! rowspan="2" | 4
! rowspan="2" colspan="3" |
| {{ItemLink|Cookie}} || 1 || 6 <!-- Probably should be 6 - 10, but see MC-49666 -->
|-
| {{ItemLink|Cake}} || 1 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Fisherman
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|String}} || 15 - 20 || 1
| rowspan="2" | {{ItemLink|Cooked Fish}} || rowspan="2" | 6 {{ItemLink|Fish}} <br> 1 {{ItemLink|Emerald}} || rowspan="2" | 6
|-
| {{ItemLink|Coal}} || 16 - 24 || 1
|-
! 2
! colspan="3" |
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8">When creating an enchantment offer, the game uses a random enchantment level from 5 – 19. For a listing of what enchantments will show up at these levels, see [[Enchantment Mechanics]]</ref> <br> {{ItemLink|Fishing Rod}} || 7 - 8 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Shepherd
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| White {{BlockLink|Wool}} || 16 - 22 || 1 || {{ItemLink|Shears}} || 3 - 4 || 1
|-
! 2
! colspan="3" |
|
{{BlockSprite|wool}} {{BlockSprite|wool-orange}} {{BlockSprite|wool-magenta}} {{BlockSprite|wool-light-blue}}
{{BlockSprite|wool-yellow}} {{BlockSprite|wool-green}} {{BlockSprite|wool-pink}} {{BlockSprite|wool-dark-gray}}
<br>{{BlockSprite|wool-gray}} {{BlockSprite|wool-cyan}} {{BlockSprite|wool-purple}} {{BlockSprite|wool-blue}}
{{BlockSprite|wool-brown}} {{BlockSprite|wool-dark-green}} {{BlockSprite|wool-red}} {{BlockSprite|wool-black}}
<br> [[Wool|Colored Wool]] <br> 16 offers containing each wool color, with varied prices. <br>
| 1 - 2
| 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Fletcher
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|String}} || 15 - 20 || 1 || {{ItemLink|Arrow}} || 1 || 8 - 12
|-
! rowspan="2" | 2
! colspan="3" rowspan="2" |
| {{ItemLink|Bow}} || 2 - 3 || 1
|-
| {{ItemLink|Flint}} || 10 {{BlockLink|Gravel}} <br> 1 {{ItemLink|Emerald}} || 6 - 10
|}
=== White Robed Villager (Librarian) ===
[[File:Librarian.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Librarian
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Paper}} || 24 - 36 || 1
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8">The enchantment is chosen randomly, with equal chance of any enchantment type occurring and equal chance to get any level of it, so higher-leveled enchantments are as likely to get as low-leveled enchantments. The price in emeralds depends on enchantment level only. The possible values are 5 – 19 emeralds for Lvl I, 8 – 32 for Lvl II, 11 – 45 for Lvl III, 14 – 58 for Lvl IV, and 17 – 71 for Lvl V. Note that the cost is capped to 64, meaning that Lvl V books truly range from 17 - 64 emeralds, but costs at the upper end of the range are more common.</ref> || 5 - 64 || 1
|-
! rowspan="2" | 2
| rowspan="2" | {{ItemLink|Book}} || rowspan="2" | 8 - 10 || rowspan="2" | 1 || {{ItemLink|Compass}} || 10 - 12 || 1
|-
| {{BlockLink|Bookshelf}} || 3 - 4 || 1
|-
! rowspan="2" | 3
| rowspan="2" | {{ItemLink|Written Book}} || rowspan="2" | 2 || rowspan="2" | 1 || {{ItemLink|Clock}} || 10 - 12 || 1
|-
| {{BlockLink|Glass}} || 1 || 3 - 5
|-
! 4
! colspan="3" |
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8"/><ref group="note" name="EnchantedBook-1.8">Librarians offer the enchanted book trade three different times.</ref> || 5 - 64 || 1
|- <!-- Leave these separate; they really are exactly two different tiers. Don't rowspan them either, please -->
! 5
! colspan="3" |
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8"/><ref group="note" name="EnchantedBook-1.8"/> || 5 - 64 || 1
|-
! 6
! colspan="3" |
| {{ItemLink|Name Tag}} || 20 - 22 || 1
|}
=== Purple Robed Villager (Priest) ===
[[File:Priest.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Cleric
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|Rotten Flesh}} || 36 - 40 || 1
! rowspan="2" colspan="3" |
|-
| {{ItemLink|Gold Ingot}} || 8 - 10 || 1
|-
! rowspan="2" | 2
! colspan="3" rowspan="2" |
| {{ItemLink|Redstone Dust}} || 1 || 1 - 4
|-
| {{ItemLink|Lapis Lazuli}} || 1 || 1 - 2
|-
! rowspan="2" | 3
! colspan="3" rowspan="2" |
| {{ItemLink|Eye of Ender}} || 7 - 11 || 1
|-
| {{BlockLink|Glowstone}} || 1 || 1 - 3
|-
! rowspan="1" | 4
! colspan="3" rowspan="1" |
| {{ItemLink|Bottle o' Enchanting}} || 3 - 11 || 1
|}
=== Black Apron Villager (Blacksmith) ===
[[File:Blacksmith.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Armorer
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || {{ItemLink|Iron Helmet}} || 4 - 6 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || {{ItemLink|Iron Chestplate}} || 10 - 14 || 1
|-
! 3
| {{ItemLink|Diamond}} || 3 - 4 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Chestplate}} || 16 - 19 || 1
|-
! rowspan="4" | 4
! colspan="3" rowspan="4" |
| {{ItemLink|Chainmail Boots}} || 5 - 7 || 1
|-
| {{ItemLink|Chainmail Leggings}} || 9 - 11 || 1
|-
| {{ItemLink|Chainmail Helmet}} || 5 - 7 || 1
|-
| {{ItemLink|Chainmail Chestplate}} || 11 - 15 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Weapon Smith
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || {{ItemLink|Iron Axe}} || 6 - 8 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Sword}} || 9 - 10 || 1
|-
! rowspan="2" | 3
| rowspan="2" | {{ItemLink|Diamond}} || rowspan="2" | 3 - 4 || rowspan="2" | 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Sword}} || 12 - 15 || 1
|-
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Axe}} || 9 - 12 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Tool Smith
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Shovel}} || 5 - 7 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Pickaxe}} || 9 - 11 || 1
|-
! 3
| {{ItemLink|Diamond}} || 3 - 4 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Pickaxe}} || 12 - 15 || 1
|}
=== White Apron Villager (Butcher) ===
[[File:Butcher.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Butcher
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|Raw Porkchop}} || 14 - 18 || 1
! colspan="3" rowspan="2" |
|-
| {{ItemLink|Raw Chicken}} || 14 - 18 || 1
|-
! rowspan="2" | 2
| rowspan="2" | {{ItemLink|Coal}} || rowspan="2" | 16 - 24 || rowspan="2" | 1 || {{ItemLink|Cooked Porkchop}} || 1 || 5 - 7
|-
| {{ItemLink|Cooked Chicken}} || 1 || 6 - 8
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Leatherworker
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Leather}} || 9 - 12 || 1 || {{ItemLink|Leather Pants}} || 2 - 4 || 1
|-
! 2
! colspan="3" |
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Leather Tunic}} || 7 - 12 || 1
|-
! 3
! colspan="3" |
| {{ItemLink|Saddle}} || 8 - 10 || 1
|}
The green Villager is no longer obtainable, even using /summon, [[server commands]], [[mods]], or third-party map editors. Attempting to create one instead yields a Farmer.<br />
The order of trades, including the order that they are unlocked, is the same for any given career of Villager. However, the prices and enchantments may vary between two Villagers of the same career.
<references group="note"/>
== Video ==
{{/video}}
== History ==
{{History|beta}}
{{History||July 13, 2011|link=http://uk.pc.ign.com/articles/118/1182014p1.html|[[Notch]] answered some questions about an idea he had, NPC Villages, where he revealed some thoughts about them:
|If you treat the villagers well (giving them items), they'll give you items back.
|If you treat the villagers badly (attacking/killing them), their [[Iron Golem]]s will try to do the same to you
|Raiding chests will anger the owners of the town/chest and they will attack.}}
{{History||May 21, 2012|link=https://twitter.com/jeb_/status/204619936616808451||Jeb released a screenshot of himself testing the Trading System. the image showed buying and selling areas.
|Jeb also mentioned that this may be an end to non-renewable resources, supposedly as most can be bought for some price from NPCs.<ref>[[jebtweet:204620549350113280]]</ref>
|In the image, there is an item later revealed to be a ruby. It was changed before 12w21a, since one of the creators is colorblind and had trouble identifying it.
|An ore block can be seen in the background later revealed in snapshot 12w21a to be Ruby Ore, it was changed to [[Emerald Ore|emerald ore]] before 12w21a because Dinnerbone is colorblind.<ref>http://www.minecraftforum.net/topic/1621716-15-new-blocksitems/#entry19977082</ref>}}
{{History|Release}}
{{History||1.3|rowspan=4|snap=12w21a|Added villager trading.}}
{{History|||snap=12w22a|Eyes of Ender are now '''sold''' by priests instead of bought, and rotten flesh is no longer bought.
|The trading UI has been changed where an extra input space has been added where tools can be placed for buying enchantments and/or repair.}}
{{History|||snap=12w23a|Prior to this snapshot, librarian defaulted to written books instead of gold ingots, since the written books had a potential offer of 1.3.}}
{{History||1.4|snap=12w32a|The librarian's paper offer was adjusted to 24-35 paper per emerald, and the farmer's arrow offer was corrected to 9-12 per emerald.
|The offer probability mechanic was changed: as more offers exist for a villager, the probability of all offers rise. When an offer's probability goes beyond a certain limit, its probability goes down. The net effect is that rarer offers become more common when a villager has many offers, and common offers become rarer.
|The offer removal mechanic has been replaced with an offer disabling mechanic.
|All offers begin with 7 uses, allowing the offer to be traded up to seven times.
|After this, even if the player has not left the trading GUI, the offer is disabled.
|If a player trades the last offer on the list and closes the GUI, waiting for particles to appear around the villager, all disabled offers are renewed with 2-12 additional uses added to them.
|It is possible for the final offer slot to be disabled, at which point no new offers can be generated and no existing offers can be renewed.
|Trading with the last offer slot available will increase your popularity with the village by one point. Note that your popularity applies to the village as a whole, and other players' popularity is not affected.}}
{{History||1.4.6|snap=12w49a|Enchanted books were added, and villagers could offer them.}}
{{History||1.5|snap=13w04a|Villagers spawned from renamed spawn eggs will show their name in the trading interface in place of "Villager".}}
{{History|upcoming}}
{{History||{{1.8}}|rowspan=3|snap=14w02a|Villager trading has been revamped.}}
{{History|||snap=14w03a|Villager Clerics no longer buy Ender Pearls, as they did in 14w02a.}}
{{History|||snap=14w31a|Clerics now sell [[Bottle o' Enchanting]], prices range from 3 to 11 emeralds each.}}
{{History|console}}
{{History||TU14|Added villager trading.}}
{{History|foot}}
== Issues ==
{{issue list|Trading|Trades|Trade}}
== Trivia ==
* Right-clicking on a villager pauses that villager's [[Mob AI|pathfinding]].
* 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.
* You cannot trade with child villagers.
* If you're not satisfied with the current trade offers, you can kill some of the villagers. The remaining villagers will start breeding again, resulting in possibly better offers. You can do this using environmental damage ([[fire]], [[lava]], [[TNT]] etc.) as not to aggravate the village's [[Iron Golem]].
* Gold armor is the only armor that cannot be traded for. (Butchers sell leather, and the blacksmith every other type.)
* In the first Pre-release of the Beta 1.9 lost update, villagers had a "name bar" above their head similar to other players in multiplayer. Their name was "TESTIFICATE".
=== Prior to trading revamp ===
* [[Charcoal]] can be sold as [[coal]] to blacksmiths and butchers.
* Trading is currently the only legitimate way to get 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.
* It is possible, when trading for an [[Enchanted Book]] with a librarian, that the cost in [[emerald]]s exceeds 64. This only happens with books containing tier 5 [[enchantments]].
== Gallery==
<gallery>
File:Villager trading preview.png|The first image of the trading system released by Jeb. The currency item (later updated to the [[emerald]]) can be seen in the inventory.
File:Jeb release 21 May 12.png|Another image released earlier by Jeb shows separated villagers.<ref>[[jebtweet:204610409980903425]]</ref>
File:Villagertradinggui.png|An edited image of the trading GUI with all items removed.
File:Trading 12w22a.png|Priest offers to player to enchant (Bane of Arthropods I) his iron sword for two emeralds.
File:Emerald.png|An image of the [[emerald]] item, the currency used for trading.
File:Villagenhanced.jpg|An enhanced version of Jeb's screenshot showing the original ore texture more clearly.
File:Villager-Trade-Glowstone.png|A villager offering trade two [[Glowstone]] blocks for one [[emerald]] in [[Development versions#12w21b|Snapshot 12w21b]]. Prior to the addition of the [[Witch]], this was the only legitimate way to obtain Glowstone without traveling to [[the Nether]].
File:Villager Trading Chart.png|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.
File:Villager 1 trade close.png|A villager closing offer in [[Development versions#12w32a|Snapshot 12w32a]].
File:VillagerLockout.png|A villager with its only offer locked.
File:FeatherFallingIV-Villager.png|A villager selling a Feather Falling IV Enchanted Book for 43 Emeralds.
File:2012-08-02 21.45.38.png|A villager selling an Efficiency III, Unbreaking III and Silk Touch I Pickaxe for an Iron Pickaxe and 4 Emeralds.
</gallery>
== References ==
{{reflist}}
{{gameplay}}
[[File:Trading paper clean GUI.png|thumb|352px|El interfaz de intercambio mostrando un intercambio de 28 unidades de [[papel]] por 1 [[esmeralda]].]]
El sistema de '''intercambio''' es una mecánica del juego que permite al [[jugador]] intercambiar [[esmeralda]]s por [[objetos]] y viceversa con NPC [[aldeano]]s.
== Funcionalidad ==
Usando click derecho sobre un [[aldeano]] abrirá un interfaz que permitirá al jugador intercambiar con él. Los aldeanos harán ofertas basadas en su profesión, y solamente harán intercambios basados en las ofertas que ellos mismos hacen. Se pueden observar ofertas distintas si se va pulsando los botones de derecha e izquierda que se sitúan al lado de la oferta mostrada. Todas las ofertas incluyen [[esmeralda]]s como recurso, y algún objeto perteneciente a la profesión del aldeano. El intercambio permite la adquisición de objetos poco comunes que si fuera de otro modo sería realmente difícil de obtener, como la armadura de malla. También es e único modo de obtener los [[Frasco con Experiencia|frascos con experiencia]] en el modo supervivencia.
Un aldeano nunca ofrecerá para comprar/vender el mismo objeto a diferentes precios o cantidades (por ejemplo, un mismo aldeano no ofrecerá chuletas de cerdo crudas a por 16 esmeraldas y 17 esmeraldas a la vez, sólo puede haber una oferta para comprarlas). Sin embargo, las cantidades y precios pueden variar entre aldeanos, y las cantidades/precios pueden variar cuando se generan nuevas ofertas.
Todos los aldeanos tienen en un inicio solamente una oferta. Pueden generar nuevas ofertas cuando la última oferta se ha cumplido al menos una vez. Es importante que se cierre el interfaz de intercambio antes de que el aldeano genere una nueva oferta. Al hacerlo, los aldeanos se ven envueltos con partículas verdes y moradas por un momento. Las nuevas ofertas pueden involucrar objetos que un aldeano ya estaba ofreciendo para comprar/vender: es cuyo caso, la oferta que se genera posteriormente sobrescribirá la anterior, permitiendo que los precios del aldeanos varíen. Pese a eso no hay un límite del número de ofertas que un aldeano individual puede hacer, solamente pueden tener una oferta por cada tipo de objeto que puedan intercambiar. Además, cuando un aldeano ya tiene varias ofertas, hay una alta probabilidad de que una oferta recién generada sea sobre un objeto que ya se ha ofrecido: pese a que la oferta antigua se sobrescriba, y no haya ningún espacio de oferta nuevo que se añada al aldeano.
Los aldeanos desactivarán una oferta si se ha usado un número determinado de veces y no es la única disponible. La probabilidad de que una oferta se desactive es aleatoria, pero una oferta se debe cumplir al menos 3 veces antes de que pueda ser desactivada. Después de que una oferta se haya usado 13 veces, se desactivará en todo caso si se cierra el interfaz de intercambio después de cumplirla. Intercambiar la última oferta activará una nueva oferta.
Antes de la [[Pretty Scary Update]] (v1.4), era posible intercambiar más de 13 veces sobre una misma oferta porque las ofertas no se eliminaban hasta que se cerraba el interfaz. Esto significaba que podías cumplir una oferta tantas veces como tus espacios en el inventario te lo permitieran. Actualmente, los aldeanos pueden interrumpir un intercambio de un objeto en particular si las condiciones para la desactivación se han dado incluso si el interfaz sigue abierto. Esto puede causar comportamientos extraños en el inventario cuando el jugador usa shift+click durante el intercambio. Al principio parece que el inventario se ha completado, pero después los objetos vuelven a estar igual que antes. Cuando se cierra y reabre la ventana del intercambio, la oferta se mostrará, pero X rojas indicarán que ya no se encuentra disponible. Pese a eso, solamente se puede eliminar na oferta después de que se cierre el interfaz de intercambio: si intercambias ofertas múltiples antes dentro límite, solamente se eliminará el último intercambio. De este modo, una oferta con más de 13 usos se pueden mantener y el juego no comprueba las ofertas para desactivar hasta que la oferta se completa.
Además, si una oferta es la última que está disponible, nunca se desactiva cuando sus usos exceden 12. Puesto que ya no es la última oferta, puede que se elija para que se desactive. Cuando una oferta se desactiva, tiene el mismo efecto de partículas que cuando se crea una oferta.
Desafortunadamente, no se puede cambiar lo que un aldeano vende, por lo que habrá que intercambiar hasta que todos los objetos se desbloqueen.
== Posibles ofertas ==
[[File:Trading-Chart.png|thumb|325px|Carta de referencia de intercambios]]
La siguiente tabla lista el mínimo y máximo de ofertas que un aldeano hará cuando se compren y venda objetos.
{{-}}
=== Granjero ===
[[File:Farmer.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Compra
|-
! width="145px" | Objeto
! Catidad
! Precio en <br>[[esmeralda]]s
! Probabilidad<br>Valor<ref group="nota" name="probabilidad">La mayoría de las ofertas tienen una probabilidad definida en el código. Cuando más grande es el número, más probable es la oferta. Esta no es la probabilidad exacta de obtener la oferta: el juego pirmero compila una lista de ofertas potenciales, y la probabilidad se usa para determinar si la oferta se incluye en la lista. Luego una ofetra se selecciona de la lista aleatoriamente para ser la oferta actual.</ref>
! <br>Probabilidad actual<ref group="nota" name="probabilidadActual">La probabilidad actual de una oferta depende de los valores de probabilidad de todas las ofertas para el aldeano. Dichos valores se calculaban comprobando las probabilidades de todas las listas de ofertas potenciales.</ref>
! Prob. de ser la última oferta<ref group="nota" name="probabilidadDeúltima">Esta es la probabilidad que que la oferta mostrada sea la última de un aldeano cuando todas las opciones se extinguen. Las ofertas con probabilidades más altas de que se muestren al principio Offers with higher probabilities of being given are more likely to show up in the beginning of a villager's list of available trades, while rarer trades will be closer to last. For example, buying gold is frequently a villager's final trade offer, because it is rare for a villager to offer to buy gold. Only after many trades will buying gold be offered, so other offers will have taken the first spots on the villager's list of trade offers.</ref>
|-
| style="text-align:left" | {{ItemLink|Wheat}}
| 18 – 21
| 1
| 0.9
| 16.0271%
| 0.0005%
|-
| style="text-align:left" | {{BlockLink|Wool}}
| 14 – 21
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Raw Chicken}}
| 14 – 17
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Cooked Fish}}
| 9 – 12
| 1
| 0.4
| 6.4622%
| 0.0147%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold">Gold ingot offers do not have a probability value 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.</ref>
| 0.0044%
| 99.7591%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{ItemLink|Bread}}
| 3 – 4
| 1
| 0.9
| 16.0271%
| 0.0005%
|-
| style="text-align:left" | {{ItemLink|Melon}}
| 5 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Apple}}
| 5 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Cookie}}
| 8 – 10
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Shears}}
| 1
| 3
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Flint and Steel}}
| 1
| 3
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Cooked Chicken}}
| 7 – 8
| 1
| 0.3
| 4.7690%
| 0.0328%
|-
| style="text-align:left" | {{ItemLink|Arrow}}
| 9 – 12
| 1
| 0.5
| 8.2163%
| 0.0070%
|-
| style="text-align:left" | {{ItemLink|Flint}}
| 4 - 5
| 10 {{BlockLink|Gravel}} and<br>1 {{ItemLink|Emerald}}
| 0.5
| 8.2163%
| 0.0070%
|}
=== Librarian ===
[[File:Librarian.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{ItemLink|Paper}}
| 24 – 35
| 1
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Book}}
| 11 – 12
| 1
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Written Book}}
| 1
| 1
| 0.3
| 7.9476%
| 0.5154%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 0.2666%
| 83.9531%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
! Prob. of Being Last Offer
|-
| style="text-align:left" | {{BlockLink|Bookshelf}}
| 1
| 3
| 0.8
| 24.8384%
| 0.0107%
|-
| style="text-align:left" | {{ItemLink|Enchanted Book}}<ref group="note" name="book>The enchantment is chosen randomly, with equal chance of any enchantment type occurring and equal chance to get any level of it, so higher-leveled enchantments are as likely to get as low-leveled enchantments. The price in emeralds depends on enchantment level only. The possible values are 5 – 19 emeralds for Lvl I, 8 – 32 for Lvl II, 11 – 45 for Lvl III, 14 – 58 for Lvl IV and 17 – 71 for Lvl V.</ref>
| 1
| 1 {{ItemLink|Book}} and<br>5 – 64 {{ItemLink|Emerald}}s
| 0.07
| 1.7573%
| 11.0006%
|-
| style="text-align:left" | {{BlockLink|Glass}}
| 4 – 5
| 1
| 0.2
| 5.1711%
| 1.4996%
|-
| style="text-align:left" | {{ItemLink|Compass}}
| 1
| 10 – 11
| 0.2
| 5.1711%
| 1.4996%
|-
| style="text-align:left" | {{ItemLink|Clock}}
| 1
| 10 – 11
| 0.2
| 5.1711%
| 1.4996%
|}
=== Priest ===
[[File:Priest.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 10.1246%
|}
{| class="wikitable" style="text-align:center"
! colspan="5" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Eye of Ender}}
| 1
| 7 – 10
| 0.3
| 13.8203%
|-
| style="text-align:left" | {{ItemLink|Bottle o' Enchanting}}
| 2 – 4
| 1
| 0.2
| 8.8493%
|-
| style="text-align:left" | {{ItemLink|Redstone}}
| 2 – 4
| 1
| 0.4
| 19.2692%
|-
| style="text-align:left" | {{BlockLink|Glowstone}}
| 2 – 3
| 1
| 0.3
| 13.8203%
|}
{| class="wikitable" style="text-align:center"
! colspan="4" | Enchants<ref group="note" name="enchant">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.
When creating the enchantment offer, the game uses a random enchantment level from 5 – 19. For a listing of what enchantments will show up at these levels, see [[Enchantment Mechanics]]</ref>
|-
! width="204px" | Item
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Iron Sword}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Pickaxe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Axe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Sword}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Pickaxe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Axe}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Iron Chestplate}}
| 2 – 4
| 0.1
| 4.2645%
|-
| style="text-align:left" | {{ItemLink|Diamond Chestplate}}
| 2 – 4
| 0.1
| 4.2645%
|}
=== Blacksmith ===
[[File:Blacksmith.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="6" | Buys
|-
! width="150px" | Item
! Quantity
! Price in<br>[[emerald]]s
! width="101px" | Price per Unit<br>in [[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Coal}} <ref group="note" name="coal">Villagers buy Charcoal as Coal in 1.7 versions, but not since snapshot 14w02a (1.8)</ref>
| 16 – 23
| 1
| 0.0435 - 0.0625
| 0.7
| 9.6382%
|-
| style="text-align:left" | {{ItemLink|Iron Ingot}}
| 8 – 9
| 1
| 0.111 - 0.125
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| 0.111 - 0.125
| 0.5
| 6.6817%<ref group="note" name="gold" /><ref group="note" name="smith">The blacksmith actually has two chances to offer to buy gold ingots. This is because it is an explicit offer a smith may ordinarily make (0.5 probability value, or 6.6765% chance), and it is also a default offer for all villagers (with a 0.0052% chance from a blacksmith). Note that, despite two chances to generate a gold ingot offer each time an offer is generated, a blacksmith will never have two separate offers to buy gold ingots in the trading interface, because the offers involve the same items.</ref>
|-
| style="text-align:left" | {{ItemLink|Diamond}}
| 4 – 5
| 1
| 0.2 - 0.3333
| 0.5
| 6.6765%
|}
{| class="wikitable" style="text-align:center"
! colspan="6" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Price per Unit<br>Ingredient<ref group="note" name="perunit">"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.</ref>
! Probability<br>Value
! width="123px" | Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Iron Sword}}
| 1
| 7 – 10
| 3.5 - 5
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Iron Axe}}
| 1
| 6 – 7
| 2 - 2.33
| 0.3
| 3.8961%
|-
| style="text-align:left" | {{ItemLink|Iron Pickaxe}}
| 1
| 7 – 8
| 2.33 - 2.67
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Iron Shovel}}
| 1
| 4 – 5
| 4 – 5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Hoe}}
| 1
| 4 – 5
| 2 - 2.5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Sword}}
| 1
| 12 – 13
| 6 - 6.5
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Diamond Axe}}
| 1
| 9 – 11
| 3 - 3.67
| 0.3
| 3.8961%
|-
| style="text-align:left" | {{ItemLink|Diamond Pickaxe}}
| 1
| 10 – 11
| 3.33 - 3.67
| 0.5
| 6.6765%
|-
| style="text-align:left" | {{ItemLink|Diamond Shovel}}
| 1
| 7
| 7
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Hoe}}
| 1
| 7
| 3.5
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Helmet}}
| 1
| 4 – 5
| 0.8 - 1
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Chestplate}}
| 1
| 10 – 13
| 1.25 - 1.625
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Leggings}}
| 1
| 8 – 9
| 1.14 - 1.29
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Iron Boots}}
| 1
| 4 – 5
| 1 - 1.25
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Helmet}}
| 1
| 7
| 1.4
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Chestplate}}
| 1
| 16 – 18
| 2 - 2.25
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Leggings}}
| 1
| 11 – 13
| 1.57 - 1.86
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Diamond Boots}}
| 1
| 7
| 1.75
| 0.2
| 2.5638%
|-
| style="text-align:left" | {{ItemLink|Chainmail Helmet}}
| 1
| 5 – 6
| 1 – 1.2
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Chestplate}}
| 1
| 11 – 14
| 1.375 – 1.75
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Leggings}}
| 1
| 9 – 10
| 1.29 – 1.43
| 0.1
| 1.2659%
|-
| style="text-align:left" | {{ItemLink|Chainmail Boots}}
| 1
| 5 – 6
| 1.25 - 1.5
| 0.1
| 1.2659%
|}
=== Butcher ===
[[File:Butcher.png|right|125px]]
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Coal}} <ref group="note" name="coal">Villagers will buy Charcoal as Coal.</ref>
| 16 – 23
| 1
| 0.7
| 21.0549%
|-
| style="text-align:left" | {{ItemLink|Raw Porkchop}}
| 14 – 17
| 1
| 0.5
| 14.0096%
|-
| style="text-align:left" | {{ItemLink|Raw Beef}}
| 14 – 17
| 1
| 0.5
| 14.0096%
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 0.794%
|}
{| class="wikitable" style="text-align:center"
! colspan="5" | Sells
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Saddle}}
| 1
| 6 – 7
| 0.1
| 2.5177%
|-
| style="text-align:left" | {{ItemLink|Leather Cap}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Tunic}}
| 1
| 4
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Pants}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Leather Boots}}
| 1
| 2 – 3
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Cooked Porkchop}}
| 6 – 7
| 1
| 0.3
| 7.9357%
|-
| style="text-align:left" | {{ItemLink|Steak}}
| 6 – 7
| 1
| 0.3
| 7.93571%
|}
===Generic Villager (green clothes) ===
''Note: The green villager is only obtainable using /summon, [[server commands]], [[mods]], or third-party map editors on version 1.7.6 or lower. In the first 1.8 snapshots when the new villager professions were added, its number was changed to -1. It doesn't spawn naturally, even when using a [[spawn egg]].''
{| class="wikitable" style="text-align:center"
! colspan="5" | Buys
|-
! width="145px" | Item
! Quantity
! Price in<br>[[emerald]]s
! Probability<br>Value
! Actual<br>Probability
|-
| style="text-align:left" | {{ItemLink|Gold Ingot}}
| 8 – 9
| 1
| N/A<ref group="note" name="gold" />
| 100%
|}
=== Notes ===
<references group="note"/>
== Future ==
{{snapshot|section}}
In 14w02a, Villager trading has been revamped:
* Villagers now spawn with careers.
** Trades are now specific to career, and are unlocked in tiers
** Villager career is now displayed in trade GUI.
* Buying/selling ''any'' of the available options can unlock new tiers/reactivate available options. This is opposed to having to trade the last offer.
** An offer is guaranteed to reactivate available options (and unlock a tier, if some have not yet been unlocked) the ''first'' time it is traded. On subsequent attempts, it will only have a 20% chance of doing so.
* New offers will no longer rewrite old ones. New offers are appended to the end of the villager's list.
* Each tier consists of a defined set of trade offers, and the tiers are the same for any given career (see chart).
* When a trade has deactivated, the red X will appear immediately and prevent further trading, instead of having to close and reopen the trading window.
* Villagers now distinguish between damage values; so, different colors of wool CANNOT replace white wool, charcoal cannot be traded in place of coal, and damaged tools cannot be traded in place of fully repaired tools. NBT data, however, is still ignored, so the content of a written book does not matter.
* Trading now gives experience.
* ''All'' villagers in your world before 14w02a+ will retain their previous trade offers, but will gain the new trading mechanics.
Different careers are assigned to each Villager (viewable in the trading GUI). For example, brown-robed Villagers can be Fletchers or Fishermen; Blacksmiths can be Armorers or Weapon Smiths; etc. Every Villager spawns with Tier 1 of their given career, which range from 2-4 initial unlocked trades (i.e. all Shepherds will spawn with only two options, buying wool and selling shears).
Completing any trade offer with a Villager ''may'' unlock a subsequent tier of new offers and reactivate old ones. This is guaranteed the first time you trade a particular offer, and also has a 20% chance of occurring with subsequent trades to that offer.
The full list of careers and tiers is listed below:
=== Brown Robed Villager (Farmer) ===
[[File:Farmer.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Farmer
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="3" | 1
| {{ItemLink|Wheat}} || 18 - 22 || 1 || rowspan="3" | {{ItemLink|Bread}} || rowspan="3" | 1 || rowspan="3" | 2 - 4
|-
| {{ItemLink|Potato}} || 15 - 19 || 1
|-
| {{ItemLink|Carrot}} || 15 - 19 || 1
|-
! 2
| {{BlockLink|Pumpkin}} || 8 - 13 || 1 || {{ItemLink|Pumpkin Pie}} || 1 || 2 - 3
|-
! 3
| {{BlockLink|Melon}} || 7 - 12 || 1 || {{ItemLink|Apple}} || 1 || 5 <!-- Probably should be 5 - 7, but see MC-49666 -->
|-
! rowspan="2" | 4
! rowspan="2" colspan="3" |
| {{ItemLink|Cookie}} || 1 || 6 <!-- Probably should be 6 - 10, but see MC-49666 -->
|-
| {{ItemLink|Cake}} || 1 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Fisherman
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|String}} || 15 - 20 || 1
| rowspan="2" | {{ItemLink|Cooked Fish}} || rowspan="2" | 6 {{ItemLink|Fish}} <br> 1 {{ItemLink|Emerald}} || rowspan="2" | 6
|-
| {{ItemLink|Coal}} || 16 - 24 || 1
|-
! 2
! colspan="3" |
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8">When creating an enchantment offer, the game uses a random enchantment level from 5 – 19. For a listing of what enchantments will show up at these levels, see [[Enchantment Mechanics]]</ref> <br> {{ItemLink|Fishing Rod}} || 7 - 8 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Shepherd
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| White {{BlockLink|Wool}} || 16 - 22 || 1 || {{ItemLink|Shears}} || 3 - 4 || 1
|-
! 2
! colspan="3" |
|
{{BlockSprite|wool}} {{BlockSprite|wool-orange}} {{BlockSprite|wool-magenta}} {{BlockSprite|wool-light-blue}}
{{BlockSprite|wool-yellow}} {{BlockSprite|wool-green}} {{BlockSprite|wool-pink}} {{BlockSprite|wool-dark-gray}}
<br>{{BlockSprite|wool-gray}} {{BlockSprite|wool-cyan}} {{BlockSprite|wool-purple}} {{BlockSprite|wool-blue}}
{{BlockSprite|wool-brown}} {{BlockSprite|wool-dark-green}} {{BlockSprite|wool-red}} {{BlockSprite|wool-black}}
<br> [[Wool|Colored Wool]] <br> 16 offers containing each wool color, with varied prices. <br>
| 1 - 2
| 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Fletcher
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|String}} || 15 - 20 || 1 || {{ItemLink|Arrow}} || 1 || 8 - 12
|-
! rowspan="2" | 2
! colspan="3" rowspan="2" |
| {{ItemLink|Bow}} || 2 - 3 || 1
|-
| {{ItemLink|Flint}} || 10 {{BlockLink|Gravel}} <br> 1 {{ItemLink|Emerald}} || 6 - 10
|}
=== White Robed Villager (Librarian) ===
[[File:Librarian.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Librarian
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Paper}} || 24 - 36 || 1
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8">The enchantment is chosen randomly, with equal chance of any enchantment type occurring and equal chance to get any level of it, so higher-leveled enchantments are as likely to get as low-leveled enchantments. The price in emeralds depends on enchantment level only. The possible values are 5 – 19 emeralds for Lvl I, 8 – 32 for Lvl II, 11 – 45 for Lvl III, 14 – 58 for Lvl IV, and 17 – 71 for Lvl V. Note that the cost is capped to 64, meaning that Lvl V books truly range from 17 - 64 emeralds, but costs at the upper end of the range are more common.</ref> || 5 - 64 || 1
|-
! rowspan="2" | 2
| rowspan="2" | {{ItemLink|Book}} || rowspan="2" | 8 - 10 || rowspan="2" | 1 || {{ItemLink|Compass}} || 10 - 12 || 1
|-
| {{BlockLink|Bookshelf}} || 3 - 4 || 1
|-
! rowspan="2" | 3
| rowspan="2" | {{ItemLink|Written Book}} || rowspan="2" | 2 || rowspan="2" | 1 || {{ItemLink|Clock}} || 10 - 12 || 1
|-
| {{BlockLink|Glass}} || 1 || 3 - 5
|-
! 4
! colspan="3" |
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8"/><ref group="note" name="EnchantedBook-1.8">Librarians offer the enchanted book trade three different times.</ref> || 5 - 64 || 1
|- <!-- Leave these separate; they really are exactly two different tiers. Don't rowspan them either, please -->
! 5
! colspan="3" |
| {{ItemLink|Enchanted Book}}<ref group="note" name="book-1.8"/><ref group="note" name="EnchantedBook-1.8"/> || 5 - 64 || 1
|-
! 6
! colspan="3" |
| {{ItemLink|Name Tag}} || 20 - 22 || 1
|}
=== Purple Robed Villager (Priest) ===
[[File:Priest.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Cleric
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|Rotten Flesh}} || 36 - 40 || 1
! rowspan="2" colspan="3" |
|-
| {{ItemLink|Gold Ingot}} || 8 - 10 || 1
|-
! rowspan="2" | 2
! colspan="3" rowspan="2" |
| {{ItemLink|Redstone Dust}} || 1 || 1 - 4
|-
| {{ItemLink|Lapis Lazuli}} || 1 || 1 - 2
|-
! rowspan="2" | 3
! colspan="3" rowspan="2" |
| {{ItemLink|Eye of Ender}} || 7 - 11 || 1
|-
| {{BlockLink|Glowstone}} || 1 || 1 - 3
|-
! rowspan="1" | 4
! colspan="3" rowspan="1" |
| {{ItemLink|Bottle o' Enchanting}} || 3 - 11 || 1
|}
=== Black Apron Villager (Blacksmith) ===
[[File:Blacksmith.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Armorer
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || {{ItemLink|Iron Helmet}} || 4 - 6 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || {{ItemLink|Iron Chestplate}} || 10 - 14 || 1
|-
! 3
| {{ItemLink|Diamond}} || 3 - 4 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Chestplate}} || 16 - 19 || 1
|-
! rowspan="4" | 4
! colspan="3" rowspan="4" |
| {{ItemLink|Chainmail Boots}} || 5 - 7 || 1
|-
| {{ItemLink|Chainmail Leggings}} || 9 - 11 || 1
|-
| {{ItemLink|Chainmail Helmet}} || 5 - 7 || 1
|-
| {{ItemLink|Chainmail Chestplate}} || 11 - 15 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Weapon Smith
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || {{ItemLink|Iron Axe}} || 6 - 8 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Sword}} || 9 - 10 || 1
|-
! rowspan="2" | 3
| rowspan="2" | {{ItemLink|Diamond}} || rowspan="2" | 3 - 4 || rowspan="2" | 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Sword}} || 12 - 15 || 1
|-
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Axe}} || 9 - 12 || 1
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Tool Smith
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Coal}} || 16 - 24 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Shovel}} || 5 - 7 || 1
|-
! 2
| {{ItemLink|Iron Ingot}} || 7 - 9 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Iron Pickaxe}} || 9 - 11 || 1
|-
! 3
| {{ItemLink|Diamond}} || 3 - 4 || 1 || style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Diamond Pickaxe}} || 12 - 15 || 1
|}
=== White Apron Villager (Butcher) ===
[[File:Butcher.png|right|125px]]
{| class="wikitable" style="text-align:center"
! width="100px" | Butcher
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! rowspan="2" | 1
| {{ItemLink|Raw Porkchop}} || 14 - 18 || 1
! colspan="3" rowspan="2" |
|-
| {{ItemLink|Raw Chicken}} || 14 - 18 || 1
|-
! rowspan="2" | 2
| rowspan="2" | {{ItemLink|Coal}} || rowspan="2" | 16 - 24 || rowspan="2" | 1 || {{ItemLink|Cooked Porkchop}} || 1 || 5 - 7
|-
| {{ItemLink|Cooked Chicken}} || 1 || 6 - 8
|}
{| class="wikitable" style="text-align:center"
! width="100px" | Leatherworker
! colspan="3" | Buys
! colspan="3" | Sells
|-
! Tier
! width="190px" | Item
! width="80px" | Quantity
! width="80px" | {{ItemSprite|emerald}} Price
! width="190px" | Item
! width="80px" | {{ItemSprite|emerald}} Price
! width="80px" | Quantity
|-
! 1
| {{ItemLink|Leather}} || 9 - 12 || 1 || {{ItemLink|Leather Pants}} || 2 - 4 || 1
|-
! 2
! colspan="3" |
| style="color: purple;" | Enchanted<ref group="note" name="enchant-1.8"/> {{ItemLink|Leather Tunic}} || 7 - 12 || 1
|-
! 3
! colspan="3" |
| {{ItemLink|Saddle}} || 8 - 10 || 1
|}
The green Villager is no longer obtainable, even using /summon, [[server commands]], [[mods]], or third-party map editors. Attempting to create one instead yields a Farmer.<br />
The order of trades, including the order that they are unlocked, is the same for any given career of Villager. However, the prices and enchantments may vary between two Villagers of the same career.
<references group="note"/>
== Video ==
{{/video}}
== History ==
{{History|beta}}
{{History||July 13, 2011|link=http://uk.pc.ign.com/articles/118/1182014p1.html|[[Notch]] answered some questions about an idea he had, NPC Villages, where he revealed some thoughts about them:
|If you treat the villagers well (giving them items), they'll give you items back.
|If you treat the villagers badly (attacking/killing them), their [[Iron Golem]]s will try to do the same to you
|Raiding chests will anger the owners of the town/chest and they will attack.}}
{{History||May 21, 2012|link=https://twitter.com/jeb_/status/204619936616808451||Jeb released a screenshot of himself testing the Trading System. the image showed buying and selling areas.
|Jeb also mentioned that this may be an end to non-renewable resources, supposedly as most can be bought for some price from NPCs.<ref>[[jebtweet:204620549350113280]]</ref>
|In the image, there is an item later revealed to be a ruby. It was changed before 12w21a, since one of the creators is colorblind and had trouble identifying it.
|An ore block can be seen in the background later revealed in snapshot 12w21a to be Ruby Ore, it was changed to [[Emerald Ore|emerald ore]] before 12w21a because Dinnerbone is colorblind.<ref>http://www.minecraftforum.net/topic/1621716-15-new-blocksitems/#entry19977082</ref>}}
{{History|Release}}
{{History||1.3|rowspan=4|snap=12w21a|Added villager trading.}}
{{History|||snap=12w22a|Eyes of Ender are now '''sold''' by priests instead of bought, and rotten flesh is no longer bought.
|The trading UI has been changed where an extra input space has been added where tools can be placed for buying enchantments and/or repair.}}
{{History|||snap=12w23a|Prior to this snapshot, librarian defaulted to written books instead of gold ingots, since the written books had a potential offer of 1.3.}}
{{History||1.4|snap=12w32a|The librarian's paper offer was adjusted to 24-35 paper per emerald, and the farmer's arrow offer was corrected to 9-12 per emerald.
|The offer probability mechanic was changed: as more offers exist for a villager, the probability of all offers rise. When an offer's probability goes beyond a certain limit, its probability goes down. The net effect is that rarer offers become more common when a villager has many offers, and common offers become rarer.
|The offer removal mechanic has been replaced with an offer disabling mechanic.
|All offers begin with 7 uses, allowing the offer to be traded up to seven times.
|After this, even if the player has not left the trading GUI, the offer is disabled.
|If a player trades the last offer on the list and closes the GUI, waiting for particles to appear around the villager, all disabled offers are renewed with 2-12 additional uses added to them.
|It is possible for the final offer slot to be disabled, at which point no new offers can be generated and no existing offers can be renewed.
|Trading with the last offer slot available will increase your popularity with the village by one point. Note that your popularity applies to the village as a whole, and other players' popularity is not affected.}}
{{History||1.4.6|snap=12w49a|Enchanted books were added, and villagers could offer them.}}
{{History||1.5|snap=13w04a|Villagers spawned from renamed spawn eggs will show their name in the trading interface in place of "Villager".}}
{{History|upcoming}}
{{History||{{1.8}}|rowspan=3|snap=14w02a|Villager trading has been revamped.}}
{{History|||snap=14w03a|Villager Clerics no longer buy Ender Pearls, as they did in 14w02a.}}
{{History|||snap=14w31a|Clerics now sell [[Bottle o' Enchanting]], prices range from 3 to 11 emeralds each.}}
{{History|console}}
{{History||TU14|Added villager trading.}}
{{History|foot}}
== Issues ==
{{issue list|Trading|Trades|Trade}}
== Trivia ==
* Right-clicking on a villager pauses that villager's [[Mob AI|pathfinding]].
* 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.
* You cannot trade with child villagers.
* If you're not satisfied with the current trade offers, you can kill some of the villagers. The remaining villagers will start breeding again, resulting in possibly better offers. You can do this using environmental damage ([[fire]], [[lava]], [[TNT]] etc.) as not to aggravate the village's [[Iron Golem]].
* Gold armor is the only armor that cannot be traded for. (Butchers sell leather, and the blacksmith every other type.)
* In the first Pre-release of the Beta 1.9 lost update, villagers had a "name bar" above their head similar to other players in multiplayer. Their name was "TESTIFICATE".
=== Prior to trading revamp ===
* [[Charcoal]] can be sold as [[coal]] to blacksmiths and butchers.
* Trading is currently the only legitimate way to get 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.
* It is possible, when trading for an [[Enchanted Book]] with a librarian, that the cost in [[emerald]]s exceeds 64. This only happens with books containing tier 5 [[enchantments]].
== Gallery==
<gallery>
File:Villager trading preview.png|The first image of the trading system released by Jeb. The currency item (later updated to the [[emerald]]) can be seen in the inventory.
File:Jeb release 21 May 12.png|Another image released earlier by Jeb shows separated villagers.<ref>[[jebtweet:204610409980903425]]</ref>
File:Villagertradinggui.png|An edited image of the trading GUI with all items removed.
File:Trading 12w22a.png|Priest offers to player to enchant (Bane of Arthropods I) his iron sword for two emeralds.
File:Emerald.png|An image of the [[emerald]] item, the currency used for trading.
File:Villagenhanced.jpg|An enhanced version of Jeb's screenshot showing the original ore texture more clearly.
File:Villager-Trade-Glowstone.png|A villager offering trade two [[Glowstone]] blocks for one [[emerald]] in [[Development versions#12w21b|Snapshot 12w21b]]. Prior to the addition of the [[Witch]], this was the only legitimate way to obtain Glowstone without traveling to [[the Nether]].
File:Villager Trading Chart.png|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.
File:Villager 1 trade close.png|A villager closing offer in [[Development versions#12w32a|Snapshot 12w32a]].
File:VillagerLockout.png|A villager with its only offer locked.
File:FeatherFallingIV-Villager.png|A villager selling a Feather Falling IV Enchanted Book for 43 Emeralds.
File:2012-08-02 21.45.38.png|A villager selling an Efficiency III, Unbreaking III and Silk Touch I Pickaxe for an Iron Pickaxe and 4 Emeralds.
</gallery>
== References ==
{{reflist}}
{{gameplay}}