Tutorial:Wandering Trader farming

Wandering traders can be farmed for their llamas, leads, leather, and most significantly, their trades.

Their trades provide a renewable source for items that would otherwise be non-renewable without glitches, including sand, red sand, small dripleaf, and coral blocks. It is generally more efficient to obtain these items by manual collection, however, farming wandering traders can be useful in challenge maps like skyblock, or in different world types where those resources would otherwise be unavailable. Since trading requires a steady supply of emeralds, a source such as a trading hall is recommended.

Mechanics

An isometric view of Slicedlime's wandering trader farm
An image of Slicedlime's wandering trader farm catchment area

The basic concept of a wandering trader farm is to efficiently spawn, lure and trap every wandering trader that appears. This is most easily accomplished by creating a large 97x97 platform above an ocean (which prevents spawns elsewhere) to maximize the potential for wandering trader spawns.

Spawning

Each day (24000 ticks), an attempt to spawn a wandering trader is made. The game first picks a random player in the world, and then looks for a bell in a 48 block radius around the player. If a bell is found, the wandering trader will spawn in a 48 block radius around that bell, otherwise, the wandering trader will attempt to spawn around the player instead. This begins with a 25% chance to attempt a spawn on the first day, a 50% chance on the second, and a 75% chance on the third and thereafter. This resets to 25% again once a trader has spawned. However, this is just the chance of an attempt at a spawn. Spawn attempts fail 90% of the time, and as such, this farm is particularly slow unless using the quit-reload exploit as explained below.

To maximize the chance of a spawn to occur at the farm, all players on a multiplayer server need to be at the farming location, else the wandering trader may spawn at another player's location, reducing efficiency.

To account for these spawning conditions, a 97x97 (48 block radius) platform is built around the player's location. This platform should be flat and well lit, with no roof or blocks placed above, to ensure all spawning spaces are valid.

Luring

Once a wandering trader has spawned, they must be swiftly moved into the nether. Upon spawning, if a bell has been found, a wandering trader will begin to walk toward that bell. This can be used to lure the wandering trader to the center of the platform into a catchment area consisting of flowing water, which will push the wandering trader into a nether portal.

Storing

After a wandering trader has been lured, it is pushed into a nether portal for storage. Moving the wandering trader to the nether ensures that they remain unloaded, so that their despawn timer doesn't deplete, and prevents them from blocking any further spawn attempts. The traders can be stored in a sealed room on the other side of the portal to be traded with in bulk at a later point.

The quit-reload exploit

This page uses MC-268140 bug to make a contraption or demonstrate a game mechanic.
 
Bugs of this nature may be fixed at any time without warning, causing the contraption to stop working. Bug exploits may be disallowed on some multiplayer servers and lead to a ban if used.
Use at your own risk.

MC-268140 is an exploit where, if you quit a world within one minute (1200 ticks) after a wandering trader spawns, when re-joining the world, the game will now have another attempt at spawning the trader after another minute passes. This can be repeated after every spawn attempt, boosting spawn rates by nearly 20 times as much.

Step-by-step guide

It is best to have a clock or stopwatch ready, as well as a suitable spawning area, as shown above.

  1. Wait for a wandering trader to spawn.
  2. Quit and rejoin the game within one minute of the spawn.
  3. Wait one minute. Another wandering trader may or may not spawn.
  4. Go back to step 2 and repeat.

You should amass many wandering traders using this method. You can use this in combination with a farm to help lure and store the traders for later use.

Explanation

The game has a timer that counts down from 20 minutes in one minute intervals. Every time the timer decreases, the game saves the value of the timer. When the timer reaches 0, the timer is saved, then a spawn attempt is made, and then the timer is reset to 20 minutes. Importantly, after the timer has reset to 20 minutes, it does not save the timer. At this point, if the world is now left and rejoined, the timer does not remember being reset to 20, and is instead set to 0. Now, when the timer counts down again, the value will instead become negative. As the game attempts to spawn a wandering trader if the timer is 0 or below, a value of -1 allows another spawn attempt to be made.

Video

Navigation