The trading system is a gameplay mechanic that allows players to exchange emeralds for items (and vice-versa) with villagers and wandering traders. Pressing use on an adult villager with a profession, or on a wandering trader, opens a menu, allowing a player to trade with that merchant. This action pauses any pathfinding the merchant was doing. If the merchant takes damage while trading, the trading menu closes. All transactions involve emeralds. Villagers have a wide variety of items…