Wiki 9Minecraft Wiki 9Minecraft

Building a Trade in Custom Villager Trades

Guides 5FAQ 6Related mods 60
DownloadCustom Villager Trades

Get the files on 9Minecraft

A single trade is made of two halves: what the player pays and what the villager gives back.

  • Offer — the item the villager hands over. This is the reward the player receives.
  • Request — the main item the player must pay.
  • Additional request — an optional second payment item, so a trade can cost two different things at once (for example emeralds and an ingot).

Each of those is an item entry with an id and an amount. On top of the price and reward, a trade carries a few numbers that control how it behaves:

  • Trade level — which of the villager's career tiers (1 to 5, from Novice to Master) the trade unlocks at.
  • Max uses — how many times the trade can be used before it locks until the villager restocks.
  • Trade experience — how much trading experience the villager gains toward its next career level from this trade.
  • Price multiplier — how strongly demand and low reputation push the price up.
  • Demand — a starting demand value that nudges the price.

Any item in the game can be used on either side, so a trade can buy a cheap block and sell something far more valuable, or the reverse.