Wandering Trader

The wandering trader is a mob similar to a villager found randomly across the world.

Spawning
The wandering trader appears randomly across the world with 2 trader llamas. In the Bedrock edition they are leashed to the trader.

Wandering traders will spawn once per world after one Minecraft day. They will spawn within a 48-block radius of a player. Initially there will be a spawn attempt made with a 2.5% chance that one will spawn; if it fails, after another minute another spawn attempt will be made with a 5% chance of success. If that fails, for all subsequent spawn attempts the chance will cap at 7.5%. After 2 or 3 days the trader along with its llamas will despawn and reset the cycle.

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

After spawning, the wandering trader will have a managed schedule for 40–60 minutes. After the time expires, the wandering trader will start to despawn if the player is further than 24 blocks away from it.

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

Like villagers, wandering traders can open and close doors, and will move indoors at night or during thunderstorms.

Wandering traders will also avoid zombie variants including zombie pigman, illagers, and vexes, staying at least 8 blocks away.

Drops
When killed, the wandering trader will unleash its trader llama and drop 2 leashes at the position of the trader llama.