Minecraft Wiki
Advertisement
For the mob in Minecraft Dungeons, see MCD:Wandering Trader.

The wandering trader is a passive mob that randomly spawns near the player. It can trade, making natural items more available, less dangerous to obtain, and in some cases, renewable.

Spawning[]

The wandering trader appears randomly in the Overworld with 2 leashed trader llamas. They typically spawn within a 48-block radius of a player. In Bedrock Edition, they also try to spawn by a claimed bell in a village.

When the world is created (or updated from an older version), a counter is initialized to 24000 ticks (20 real-life minutes, or 1 Minecraft day). Each minute (1200 ticks), if /gamerule doTraderSpawning is set to true,‌[Java Edition only] the counter is decreased by 1200. When the counter reaches 0 it is reset to 24000 and, if /gamerule doMobSpawning is set to true, an attempt may be made to spawn a wandering trader. The first time there is a 25% chance of making the attempt, which increases to 50% the second time and is 75% thereafter until a trader is spawned or no player is found for the attempt.

When attempting a spawn, a random player is selected. If no player is found, no trader is spawned but the chance for future attempts is reset to 25%. If a player is found, then 90% of the time the spawn attempt immediately fails.

It should be noted, if there is a bell within 48 blocks of the player then the nearest such bell is used as the target location.

After either of the above conditions are met: ten attempts are made to find a valid mob spawning location on the uppermost block of a random X/Z position within -48/+47 of the target location on each axis. If spawning the trader succeeds, an additional ten attempts are made for each of two trader llamas to find a position within -4/+3 of the trader.[verify] Wandering traders can still spawn if the passive mob cap is full.

In Bedrock Edition, 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_event is set to false.

Despawning[]

A wandering trader despawns after being loaded for 48000 ticks (40 minutes, or 2 full Minecraft days), although ticks spent with the trading UI open are not counted.[verify] Naming the wandering trader with a name tag or placing the wandering trader in a boat/minecart does not prevent it from despawning.[1] This also includes wandering traders as passengers of other mobs in Java Edition, where the wandering trader still despawns if summoned on top of another mob.

When a wandering trader is unloaded, either by moving into unloaded chunks or entering another dimension, its despawn timer freezes.


Behavior[]

The wandering trader has 6 random trades. New trades are not unlocked after trading with it.

After spawning, the wandering trader prefers to wander within 16 blocks of the initial spawning target location, even if that player leaves or the bell is removed, if not otherwise reacting to nearby players or mobs.[verify]

The wandering trader can sometimes form a caravan, due to wild llamas that follow the leashed trader llama(s).

Wandering traders drink a potion of invisibility during dusk and as needed to renew the effect during the night. They also drink milk if invisible during the day to remove the invisibility effect.

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.[2]

Wandering traders drink potions of invisibility if hurt by magic attacks or projectiles from hostile mobs (but not players), or when avoiding illagers, vexes, and zombies.‌[BE only]

When attacked by a player, a wandering trader flees from the player as a villager would do. The llamas, however, attack the player by spitting if their master gets hit, except in Peaceful. The llamas stop attacking if the player is killed and respawns, if the llamas are leashed after the wandering trader is killed, or if the player gets far enough away from them for a short period of time.

Despite their similarities to villagers, attacking or killing wandering traders does not anger iron golems.[3]

Unlike most other villager-like mobs, wandering traders do not visually sit down when riding objects such as boats and minecarts.[4]

Trading[]

Wandering Trader GUI

The trading UI of a wandering trader in Java Edition.

For the available trades for the wandering trader, see Trading § Wandering trader.

The trading system is a gameplay mechanic that allows players to buy items with emeralds, but from a wandering trader this time.

A player can click on the wandering trader to view the items offered for sale, similar to a villager. Different offers are visible in a list, and clicking on one of the offers moves the corresponding items to the slots above the player's inventory. All offers involve emeralds as a currency.

Wandering traders typically sell 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 as coral blocks, blue ice, or nautilus shells. Overall, trades offered by wandering traders offer a way to obtain biome-specific materials, without having to travel to the specific biomes.

After the player purchases the same item several times, the wandering trader locks the trade, but unlike villagers, never unlocks the trade. The wandering trader can appear again around the player with new trades after a while.

Wandering traders do not have the novice-master trading system like villagers. Instead, the player can buy anything from the wandering trader without the need of unlocking the previous trades.

Wandering traders do not increase or decrease the prices of its items being sold if attacked by the player, or if the player has the Hero of the Village effect.

Unlike villagers, wandering traders only sell items, they do not buy items. Wandering traders do not have an experience bar and do not modify their offers or prices based on changing demand. This (the trade items or prices) can be changed by the player by editing the corresponding NBT data flag through the use of the /data[JE only] command.

Wandering traders are the only renewable source of sand, red sand, coral blocks, and small dripleaves.

The wandering trader cannot work at a job site block and restock, even summoned with a villager profession or other villager data.

Drops[]

  • A milk bucket (8.5% chance, increased 1% per level of Looting) if killed while holding or before finishing drinking.
  • A potion of invisibility (8.5% chance, increased 1% per level of Looting) if killed while holding or before finishing drinking.

A wandering trader is also a source of leads, as it typically spawns with two leashed trader llamas. These leads break and drop (at the location of the llama) if either trader or llama dies or if they are separated.

Wandering traders do not drop any loot when they despawn.

Wandering traders do not reward any experience when killed or when the player successfully trades with the wandering trader.

Sounds[]

Java Edition:
Wandering traders use the Friendly Creatures sound category for entity-dependent sound events.

SoundSubtitlesSourceDescriptionResource locationTranslation keyVolumePitchAttenuation
distance
Wandering Trader mumblesFriendly CreaturesRandomlyentity.wandering_trader.ambientsubtitles.entity.wandering_trader.ambient1.00.8-1.216
Wandering Trader tradesFriendly CreaturesWhile the trade UI on a wandering trader is openentity.wandering_trader.tradesubtitles.entity.wandering_trader.trade1.00.8-1.216
Wandering Trader diesFriendly CreaturesWhen a wandering trader diesentity.wandering_trader.deathsubtitles.entity.wandering_trader.death1.00.8-1.216
Wandering Trader hurtsFriendly CreaturesWhen a wandering trader is damagedentity.wandering_trader.hurtsubtitles.entity.wandering_trader.hurt1.00.8-1.216
Wandering Trader agreesFriendly CreaturesWhen a player successfully trades with a wandering traderentity.wandering_trader.yessubtitles.entity.wandering_trader.yes1.00.8-1.216
Wandering Trader disagreesFriendly CreaturesWhen a player fails to trade with a wandering trader due to lack of resourcesentity.wandering_trader.nosubtitles.entity.wandering_trader.no1.00.8-1.216
Wandering Trader drinks milkFriendly CreaturesWhile a wandering trader is drinking milk to become visible during daytimeentity.wandering_trader.drink_milksubtitles.entity.wandering_trader.drink_milk0.50.9-1.016
Wandering Trader drinks potionFriendly CreaturesWhile a wandering trader is drinking a potion to become invisible during nighttimeentity.wandering_trader.drink_potionsubtitles.entity.wandering_trader.drink_potionvaries [sound 1]0.9-1.016
Wandering Trader disappearsFriendly CreaturesWhen a wandering trader becomes invisibleentity.wandering_trader.disappearedsubtitles.entity.wandering_trader.disappeared0.80.9-1.116
Wandering Trader appearsFriendly CreaturesWhen a wandering trader becomes visibleentity.wandering_trader.reappearedsubtitles.entity.wandering_trader.reappeared0.80.9-1.116
  1. The first listed sound is 0.35; the second listed sound is 0.325

Bedrock Edition:

SoundSourceDescriptionResource locationVolumePitch
Friendly CreaturesRandomlymob.wanderingtrader.idle1.00.8-1.2
Friendly CreaturesWhen a wandering trader diesmob.wanderingtrader.death1.00.8-1.2
Friendly CreaturesWhen a wandering trader is damagedmob.wanderingtrader.hurt1.00.8-1.2
Friendly CreaturesWhen a wandering trader becomes invisiblemob.wanderingtrader.disappeared1.00.8-1.2
Friendly CreaturesWhen a wandering trader becomes visiblemob.wanderingtrader.reappeared1.00.8-1.2
Friendly CreaturesWhile a wandering trader is drinking milk to become visible during daytimemob.wanderingtrader.drink_milk1.00.8-1.2
Friendly CreaturesWhen a wandering trader drinks a potion to become invisible during nighttimemob.wanderingtrader.drink_potionvaries[sound 1]0.8-1.2
Friendly CreaturesWhile the trade UI on a wandering trader is openmob.wanderingtrader.haggle1.00.8-1.2
Friendly CreaturesWhen a player successfully trades with a wandering tradermob.wanderingtrader.yes1.00.8-1.2
Friendly CreaturesWhen a player fails to trade with a wandering trader due to lack of resourcesmob.wanderingtrader.no1.00.8-1.2
  1. wandering_trader/drink_potion is 0.7 and random/drink is 0.65

Data values[]

ID[]

Java Edition:

NameIdentifierTranslation key
Wandering Traderwandering_traderentity.minecraft.wandering_trader

Bedrock Edition:

NameIdentifierNumeric ID Translation key
Wandering Traderwandering_trader118entity.wandering_trader.name

Entity data[]

Wandering traders have entity data associated with them that contains various properties.

Java Edition:

Main article: Entity format
  • Entity data
      • Additional fields for mobs that can breed
    • Tags common to all entities
    • Tags common to all mobs
    •  DespawnDelay: The number of ticks counted down until this wandering trader is forced to despawn. The wandering trader despawns when this value reaches 1.
    •  Offers: Is generated when the trading menu is opened for the first time.
      •  Recipes: List of trade options.
        • A trade option.
          •  buy: The first 'cost' item, without the Slot tag.
            • Tags common to all items
          •  buyB: May not exist. The second 'cost' item, without the Slot tag.
            • Tags common to all items
          •  maxUses: The maximum number of times this trade can be used before it is disabled. Increases by a random amount from 2 to 12 when offers are refreshed.
          •  rewardExp: 1 or 0 (true/false) - true if this trade provides XP orb drops. All trades from naturally-generated villagers in Java Edition reward XP orbs.
          •  sell: The item being sold for each set of cost items, without the Slot tag.
            • Tags common to all items
          •  uses: The number of times this trade has been used. The trade becomes disabled when this is greater or equal to maxUses.
    •  WanderTarget: Destination toward where this trader wanders.
      •  X: The X coordinate to wander toward.
      •  Y: The Y coordinate to wander toward.
      •  Z: The Z coordinate to wander toward.
    •  Inventory: Each compound tag in this list is an item in the wandering trader's inventory, up to a maximum of 8 slots. Items in two or more slots that can be stacked together are automatically be condensed into one slot. If there are more than 8 slots, the last slot is removed until the total is 8. If there are 9 slots but two previous slots can be condensed, the last slot returns after the two other slots are combined. Wandering traders don't change their inventory automatically or drop items from it upon death. The inventory is currently unused.
      • An item in the inventory, excluding the Slot tag.
        • Tags common to all items

Bedrock Edition:

See Bedrock Edition level format/Entity format.

Achievements[]

Icon Achievement In-game description Actual requirements (if different) Gamerscore earned Trophy type (PS4)
PS4 Other
The HagglerAcquire or spend 30 Emeralds by trading with villagers or with wandering trader. [sic]30GSilver

Advancements[]

Icon Advancement In-game description Parent Actual requirements (if different) Resource location
Advancement-plain-rawWhat a Deal!
Successfully trade with a Villager AdventureTake an item from a villager or wandering trader's trading output slot, and put it in your inventory.adventure/trade
Advancement-plain-rawStar Trader
Trade with a Villager at the build height limit What a Deal!Stand on any block that is higher than 318 and trade with a villager or wandering trader.adventure/trade_at_world_height

History[]


Java Edition
1.1419w05aWandering Trader Added the wandering trader.
19w06aWandering traders now drink invisibility potions at dusk and milk buckets at dawn.
19w09aAdded two new sounds for wandering traders when they drink invisibility potions and milk.
1.15.2Pre-Release 1The spawning of wandering traders can now be controlled using /gamerule doTraderSpawning.
1.1721w05aWandering traders can sell small dripleaf.
21w13aWandering traders can sell pointed dripstone, rooted dirt and moss block.
1.1922w15aWandering traders can sell mangrove propagules.
1.20
(Experimental)
23w07aWandering traders can sell cherry saplings.
Upcoming Java Edition
Villager Trade Rebalance
(Experimental)
23w31aWandering traders now sell more items, and buy certain items from the player.
Most existing trades have lower prices and higher amounts in stock.
Bedrock Edition
1.10.0beta 1.10.0.3Wandering Trader Added the wandering trader, available only through Experimental Gameplay.
1.11.0beta 1.11.0.3Wandering traders now drink a potion of invisibility during dusk, when hurt by projectiles or magic attacks, and when avoiding illagers and zombies.
If a player is holding an emerald, wandering traders now hold items they want to trade.
The spawning of wandering traders can now be enabled or disabled using the /mobevent command.
beta 1.11.0.4Wandering traders have been fully implemented and are now separate from Experimental Gameplay.
Wandering traders now disappear faster after all trades are disabled.
Wandering traders now have 6 random trades, instead of 4.
1.12.0beta 1.12.0.2Wandering traders now have sounds.
1.17.0beta 1.16.230.54Wandering traders can sell small dripleaf, pointed dripstone, rooted dirt and moss block.
1.19.0beta 1.19.0.24Wandering traders can sell mangrove propagules.
1.19.10beta 1.19.10.21Wandering traders now drink milk at dawn.
1.19.20beta 1.19.20.20Wandering traders no longer spawn underground.
1.20.30beta 1.20.20.20Wandering traders now can sell 1 cherry sapling for 5 emeralds.
PlayStation 4 Edition
1.91Wandering Trader Added the wandering trader.

Issues[]

Issues relating to "Wandering Trader" are maintained on the bug tracker. Report issues there.

Trivia[]

  • The wandering trader was inspired by traveling merchants from various RPGs, specifically ones that appeared to provide players with healing items in dangerous places.[5]
  • Villagers display their held items differently than most creatures do, using the "ground" parameter instead of the usual hand parameter in model display settings.

Gallery[]

Screenshots[]

In other media[]

Notes[]


References[]

  1. MC-143982 — "Named wandering traders despawn" — resolved as "Works As Intended".
  2. MC-143747 — resolved as "Won't Fix".
  3. MC-153693 — resolved as "Works As Intended".
  4. MC-161106 — resolved as "Works as Intended".
  5. "Meet the Wandering Trader" by Per Landin. Minecraft.net, March 22, 2019

External links[]

Advertisement