Wandering Trader

Revision as of 21:08, 14 December 2024 by MeowMeow123 (talk | contribs) (→‎Despawning: I fully traded with a wandering trader on bedrock edition, I went to the storage which was close by, I came back and there was no wandering trader.)
Jump to navigation Jump to search
This article is about the mob in Minecraft. For the entity in Minecraft Dungeons, see Dungeons:Wandering Trader. For the entity in A Minecraft Movie, see Movie:Wandering Trader.
Wandering Trader
Wandering Trader.png: Infobox image for Wandering Trader the entity in Minecraft
Invicon Wandering Trader Spawn Egg.png: Inventory sprite for Wandering Trader Spawn Egg in Minecraft as shown in-game with description: Wandering Trader Spawn EggInvicon Wandering Trader Spawn Egg BE.png: Inventory sprite for Wandering Trader Spawn Egg BE in Minecraft as shown in-game with description: Wandering Trader Spawn Egg
Health points

20HP♥ × 10

Behavior

Passive

Mob type

NPC[note 1]

Hitbox size

In Java Edition:
Height: 1.95 blocks
Width: 0.6 blocks
In Bedrock Edition:
Height: 1.9 blocks
Width: 0.6 blocks

Speed

0.7

Spawn

See § Spawning

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

  1. MC-143982 — Named wandering traders despawn — resolved as "Works As Intended".