Thewandering traderis a passive NPC mob found randomly across the world.
Contents
- 1 Spawning
- 2 Behavior
- 3 Drops
- 4 Trading
Spawning[]
The wandering trader appears randomly across the world or periodically invillagegathering sites, usually near village meeting points, with 2leashedtraderllamas.
At any time, there can be only one wandering trader naturally spawned in the world. After 24000ticks(20 real-life minutes, or 1 Minecraft day) have passed since the world is created, the game attempts to spawn a wandering trader.
If there are no wandering traders currently in the world, the game tries to spawn a new wandering trader after every following 24000 ticks, within a 48-block radius of a player. The first spawn attempt has a 2.5% chance of success; if it fails, after another 24000 ticks another spawn attempt is made with a 5% chance of success. If that fails, for all subsequent spawn attempts the chance caps at 7.5%. On average, it takes 14.325 Minecraft days for a wandering trader to spawn. After 48000 or 72000 ticks, the trader despawns along with its llamas, resetting the cycle.
Trader llamas will not despawn if they are detached from the wandering trader's leads.
When using spawn eggs or the/summon
command to spawn a wandering trader, llamas always spawn with it.
Wandering traders never spawn if/mobevent
minecraft:wandering_trader
is set to false.
Behavior[]
The wandering trader has 6 random trades. New trades are not unlocked after trading with it.
After spawning, the wandering trader has a managed schedule for 40–60 minutes. After the time expires, the wandering trader despawns, even if the wandering trader is named with aname tagor put in a vehicle such as aminecartorboat. A wandering trader despawns sooner if all trades have been locked. The trader may later respawn with new trades.
The wandering trader can sometimes form a caravan, due to wild llamas that follow the leashed trader llama(s).
Wandering traders drink apotion of invisibilityduring dusk. At dawn they drinkmilkto remove the invisibility.
Wandering traders avoid zombies and their variants, all illager variants, and vexes, staying at least 8 blocks away. Unlike other villagers, a wandering trader killed by zombies does not become a zombie villager.
Wandering traders drink potions of invisibility if hurt by magic attacks or projectiles from hostile mobs, or when avoiding illagers, vexes, and zombies.
When attacked by a player, a wandering trader flees from the player as avillagerwould do. The llamas however, will attack the player if their master gets hit.
Like villagers, wandering traders can also close and open wooden doors.
Drops[]
- amilk bucket(8.5% chance, increased 1% per level ofLooting).[JEonly]
- apotion of invisibility(8.5% chance, increased 1% per level ofLooting) if killed while holding or before finishing drinking.
A wandering trader also dropleadswhen killed or when separated too far from itstrader llamas. The leads break and appear at the position of the llamas. The llamas will also drop their leads when killed.
Trading[]
The trading system is agameplaymechanic that allows players to buyitemswithemeralds.
A player can click on the wandering trader to view the items offered for sale. Different offers may be viewed by pressing the left and right buttons next to the currently displayed offer. All offers involveemeraldsas a currency. A wandering trader has an emerald above its head while trading[BEonly]and typically sells items generated in the world or otherwise related to nature, such as plants, dyes, and buckets of fish. They can also trade less common items, such ascoralorblue ice.
After the player purchases the same item several times, the wandering trader will lock the trade, but unlike villagers, is unable to unlock the trade.
Unlike villagers who both give and receive emeralds in exchange for items, wandering traders only sell items for emeralds. They also lack an experience bar. On top of this, wandering traders do not modify their offers based on increased or decreased demand naturally, unless the player edits the corresponding NBT data flag through use of thedatacommand.