Wandering Trader
Health points |
20HP × 10 |
---|---|
Behavior |
Passive |
Mob type |
NPC[note 1] |
Hitbox size |
In Java Edition: |
Speed |
0.7 |
Spawn |
See § Spawning |
{ "title": "Wandering Trader", "rows": [ { "field": "20<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"1 heart\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=♥)</span> × 10</span>", "label": "(link to Health article, displayed as Health points)" }, { "field": "Passive", "label": "Behavior" }, { "field": "NPC", "label": "(link to Mob article, displayed as Mob) type" }, { "field": "'''In (link to Java Edition article, displayed as ''Java Edition''):'''<br>\nHeight: 1.95 blocks<br>Width: 0.6 blocks<br>\n'''In (link to Bedrock Edition article, displayed as ''Bedrock Edition''):'''<br>\nHeight: 1.9 blocks<br>Width: 0.6 blocks", "label": "(link to Hitbox article, displayed as Hitbox size)" }, { "field": "0.7", "label": "(link to Attribute#movementSpeed article, displayed as Speed)" }, { "field": "See (link to #Spawning article, displayed as <span style=\"white-space: nowrap;\">§ Spawning</span>)", "label": "(link to Mob spawning article, displayed as Spawn)" } ], "invimages": [ "Wandering Trader Spawn Egg", "Wandering Trader Spawn Egg BE" ], "images": [ "Wandering Trader.png" ] }
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.
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 for Bedrock Edition] Wandering traders and their llamas can still spawn if the passive mob cap is full. Depending on the player's position, the wandering trader may spawn in a space underground.
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 for Bedrock Edition] Naming the wandering trader with a name tag and/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.
Wandering traders despawn sooner if all the trades are locked.[Bedrock Edition only]
Cite error: <ref>
tags exist for a group named "note", but no corresponding <references group="note"/>
tag was found