Functionality[επεξεργασία | επεξεργασία κώδικα]
Right-clicking on a villager will open a GUI allowing a player to trade with the villager. Villagers will make offers based on their profession and career, and will only make trades based on what offers they are making. Different offers may be viewed by pressing the left and right buttons next to the currently displayed offer. All offers involve emerald as a currency, and some item pertinent to the villager's career. Trading allows the acquisition of uncommon items. It is also the only legitimate method of acquiring bottles o' enchanting in Survival mode.
Different careers are assigned to each villager, and are 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). Each tier consists of a defined set of trade offers, and the tiers are the same for any given career (see the chart below). They can unlock new tiers when an existing offer is traded. Note that the trading GUI must be closed before a villager will unlock a new tier. When they do, they will receive Regeneration I and become surrounded with purple and green particles for a few seconds. Each career has a fixed sequence of tiers, and will only unlock a finite number of offers.
Villagers will deactivate an offer if the offer has been used some number of times. The chance of an offer's deactivation is random, but an offer must be used at least 2 times before it is eligible for deactivation. After an offer has been used 12 times, it is guaranteed to be deactivated. Trading a different offer may activate an offer again. When an offer is disabled, a red X will appear in the trading interface, and it has the same particle effect as an offer being created.
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 trades, it will only have a 20% chance of doing so, per trade. For example, if a farmer villager has a trade which is 8 pumpkins for 1 emerald, and a stack of 64 pumpkins is traded, this will count as 8 attempts with each attempt having a 20% chance to reactivate the villager's trades.
Villagers will 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 ignored, so the content of a written book does not matter.
The full list of careers and tiers is below:
Brown Robed Villager[επεξεργασία | επεξεργασία κώδικα]
|1||Wheat||18 - 22||1||Bread||1||2 - 4|
|Potato||15 - 19||1|
|Carrot||15 - 19||1|
|2||Pumpkin||8 - 13||1||Pumpkin Pie||1||2 - 3|
|3||Melon||7 - 12||1||Apple||1||5 - 7|
|4||Cookie||1||6 - 10|
|1||String||15 - 20||1||Cooked Fish||6 Fish
|Coal||16 - 24||1|
|7 - 8||1|
|1||White Wool||16 - 22||1||Shears||3 - 4||1|
||1 - 2||1|
|1||String||15 - 20||1||Arrow||1||8 - 12|
|2||Bow||2 - 3||1|
|6 - 10|
White Robed Villager[επεξεργασία | επεξεργασία κώδικα]
|1||Paper||24 - 36||1||Enchanted Book[note 2]||5 - 64||1|
|2||Book||8 - 10||1||Compass||10 - 12||1|
|Bookshelf||3 - 4||1|
|3||Written Book||2||1||Clock||10 - 12||1|
|Glass||1||3 - 5|
|4||Enchanted Book[note 2][note 3]||5 - 64||1|
|5||Enchanted Book[note 2][note 3]||5 - 64||1|
|6||Name Tag||20 - 22||1|
|1||Paper||24 - 36||1|
|3||Empty Map||7 - 11||1|
|4||Ocean Explorer Map[note 4]||1 Compass
12 - 20 Emerald
|Woodland Explorer Map[note 4]||1 Compass
16 - 28 Emerald
Purple Robed Villager[επεξεργασία | επεξεργασία κώδικα]
|1||Rotten Flesh||36 - 40||1|
|Gold Ingot||8 - 10||1|
|2||Redstone Dust||1||1 - 4|
|Lapis Lazuli||1||1 - 2|
|3||Ender Pearl||4 - 7||1|
|Glowstone||1||1 - 3|
|4||Bottle o' Enchanting||3 - 11||1|
Black Apron Villager[επεξεργασία | επεξεργασία κώδικα]
|1||Coal||16 - 24||1||Iron Helmet||4 - 6||1|
|2||Iron Ingot||7 - 9||1||Iron Chestplate||10 - 14||1|
|3||Diamond||3 - 4||1||Enchanted[note 1] Diamond Chestplate||16 - 19||1|
|4||Chainmail Boots||5 - 7||1|
|Chainmail Leggings||9 - 11||1|
|Chainmail Helmet||5 - 7||1|
|Chainmail Chestplate||11 - 15||1|
|1||Coal||16 - 24||1||Iron Axe||6 - 8||1|
|2||Iron Ingot||7 - 9||1||Enchanted[note 1] Iron Sword||9 - 10||1|
|3||Diamond||3 - 4||1||Enchanted[note 1] Diamond Sword||12 - 15||1|
|Enchanted[note 1] Diamond Axe||9 - 12||1|
|1||Coal||16 - 24||1||Enchanted[note 1] Iron Shovel||5 - 7||1|
|2||Iron Ingot||7 - 9||1||Enchanted[note 1] Iron Pickaxe||9 - 11||1|
|3||Diamond||3 - 4||1||Enchanted[note 1] Diamond Pickaxe||12 - 15||1|
White Apron Villager[επεξεργασία | επεξεργασία κώδικα]
|1||Raw Porkchop||14 - 18||1|
|Raw Chicken||14 - 18||1|
|2||Coal||16 - 24||1||Cooked Porkchop||1||5 - 7|
|Cooked Chicken||1||6 - 8|
|1||Leather||9 - 12||1||Leather Pants||2 - 4||1|
|2||Enchanted[note 1] Leather Tunic||7 - 12||1|
|3||Saddle||8 - 10||1|
Generic green robed "Nitwit" villagers have no trades.
- 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
- 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 and "treasure" status. 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. For "treasure" enchantments the price is doubled. Note that the cost is capped to 64, meaning that for example Lvl V books truly range from 17 - 64 emeralds with costs at the upper end of the range being more common.
- Librarians offer the enchanted book trade three different times.
- This trade cannot be unlocked while in a Superflat world that does not include the structure as part of its preset. The trade can be unlocked, however, while in a world with 'Generate Stuctures' set to 'OFF', and also in a Customized world with the specific structure toggled to 'No'.
Video[επεξεργασία | επεξεργασία κώδικα]
History[επεξεργασία | επεξεργασία κώδικα]
|July 13, 2011||Notch answered some questions about an idea he had for villagers: 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 Golems will try to do the same to you, and raiding chests will anger the owners of the town/chest and they will attack.|
|May 21, 2012||Jeb released a screenshot of himself testing the Trading System. the image showed buying and selling areas.|
|An ore block can be seen in the background later revealed in snapshot 12w21a to be Ruby Ore, it was changed to emerald ore before 12w21a because Dinnerbone is colorblind.|
|1.3.1||12w21a||Added villager trading.|
|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.|
|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.|
|1.4.2||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.|
|1.4.6||12w49a||Enchanted books were added, and villagers could offer them.|
|1.5||13w04a||Villagers spawned from renamed spawn eggs will show their name in the trading interface in place of "Villager".|
|1.8||14w02a||Villager trading has been revamped. See here for offers before 1.8.|
|14w03a||Villager Clerics no longer buy Ender Pearls, as they did in 14w02a.|
|14w31a||Clerics now sell Bottle o' Enchanting, prices range from 3 to 11 emeralds each.|
|1.9||15w41a||Clerics no longer sell Eyes of Ender.|
|Clerics now sell Ender Pearls, prices range from 4 to 7 emeralds each.|
|15w43a||Librarians charge double for books with "treasure" enchantments.|
|1.11||16w39a||Added new trades through the Cartographer career.|
|TU14||CU1||1.04||Patch 1||Added villager trading.|
|TU20||CU8||1.13||Librarian villagers now may offer name tags for sale.|
|TU31||CU19||1.22||Patch 3||Changed villager trades to offers as of PC 1.8.|
Issues[επεξεργασία | επεξεργασία κώδικα]
Issues relating to “Trading”, “Trades”, or ”Trade“ are maintained on the issue tracker. Report issues there.
Trivia[επεξεργασία | επεξεργασία κώδικα]
- Right-clicking on a villager pauses that villager's pathfinding.
- If a Villager takes damage while trading, the trading GUI will close.
- You cannot trade with baby villagers.
- In MCPE crouching and keeping your cursor on a villager will bring up an "Open" button that does not work.
Gallery[επεξεργασία | επεξεργασία κώδικα]
The first image of the trading system released by Jeb. The currency item (later updated to the emerald) can be seen in the inventory.
Another image released earlier by Jeb shows separated villagers.
An image of the emerald item, the currency used for trading.
A villager closing offer in Snapshot 12w32a.
- 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.