Tutorials/Villager trading hall

This guide seeks to teach you how to create a villager trading hall.

Purpose
Villager trading halls maximize the number of villagers that can be easily reached. They also provide a way to quickly discard unwanted villagers and replace the ones that are discarded. They can take the form of a literal “hall”, with villagers lined up and waiting for the player to trade with them.

Mechanics
There are three parts to a villager trading hall: the input, storage, and output.

Input
The villagers for a trading hall generally come from a villager breeder. A source anywhere else is impractical given the amount of effort exerted to transport villagers out of a village.

The mechanism that puts the villager into the hall must be able to close off the cell once the villager enters, to prevent more villagers from entering that cell. The mechanism must then open the next cell to allow for a villager to enter.

Storage
Sometimes, the player will want to keep a villager because it has valuable or worthwhile trades. These villages must be accessed, so they stay in separate “cells” until a better villager comes along, at which point the player may wish to discard the villager. These villagers must be protected from zombies, lightning, and other things that could bring harm to these villagers.

Output
A villager may come along with undesirable trades, or no trades at all. Also, a better villager might come along that would replace one that already exists in the hall. At this point, the player may wish to discard the villager, and the trading hall must provide a way to do so.

This discarding mechanism must be able to remove the villager from the cell and then open it up to allow for more villagers to drop in.

Once a villager is discarded, it is up to the player to do what they want with them. The most common thing to do is move the discarded villagers into one area, where they are killed by whatever means suits the player. However, the player may want to store them for an iron golem farm, put them into a village, or put them to work in farms and breeders.

Designs
Designs come in all shapes and sizes, but they all have the same basic parts, as described above.