How to make Villager Trades

Works with
Section

Villager trades

Contrary to other mod elements, when you create a Villager trade mod element, you can put all your custom trades inside this specific mod element. However, you can still make multiple mod elements if you think this is easier to find each profession.

Properties

Prices

The price items are the item(s) the player will need to give to receive the result. The first price is mandatory as otherwise, there can not have a trade. However, the second item is optional. You will also need to define how many of each item will be required to make the trade.

Offered item

This is what the player will receive. The behaviour is the same as of the first price.

Level

Which level the villager needs to have the capacity of offering the trade.

Max trades

This is the number of times a player can do this specific trade before it becomes unavailable. The villager will then have to re-stock himself by working.

XP given to the villager

The quantity of experience the villager will receive for each trade. After a defined number of XP points, the villager reaches the next level.

Price multiplier

Items with a high price multiplier (0.2) are affected by these changes more than items with a low multiplier (0.05). All price fluctuations affect only the first item involved in trade; for example, for an initial trade of 32 sticks for 1 emerald, the price might be driven down to 1 stick or up to 64 sticks for 1 emerald, but never for 2 emeralds. Additionally, no quantity can go lower than 1 or higher than the stack size.

- Minecraft Wiki: Trading

Video tutorial

If you prefer to watch the video, you can find the wiki page above summarized in a video:



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.