Trade set
Minecraft Wiki article. Categories: Data_packs
This article is reproduced from Trade set on the Minecraft Wiki. Mirrored from revision 3691171. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
A trade set is a grouping of trades offered by villagers and wandering traders.
Usage
Trade sets are defined in data packs in the path data/<namespace>/trade_set. Only 68 specific hardcoded trade sets are used by the game. Overriding them modifies the trades offered by villagers or wandering traders. Creating new trade sets has no effect. Nitwit and unemployed do not have a trade set, even if added by datapecks.
The hardcoded trade sets are:
minecraft:<villager profession>/level_<level>— Trades are unlocked when a villager with profession <villager profession> level up to level <level>. For level 1, trades unlocked when the unemployed villager changes to profession <villager profession>.minecraft:wandering_trader/buying— First trades of the wandering trader.minecraft:wandering_trader/uncommon— Middle trades of the wandering trader.minecraft:wandering_trader/common— Last trades of the wandering trader.
| Profession | ID |
|---|---|
armorer
| |
butcher
| |
cartographer
| |
cleric
| |
farmer
| |
fisherman
| |
fletcher
| |
leatherworker
| |
librarian
| |
mason
| |
shepherd
| |
toolsmith
| |
weaponsmith
|
- ↑ Except nitwit (
nitwit) and unemployed (none)
| Level | ID |
|---|---|
1
| |
2
| |
3
| |
4
| |
5
|
JSON format
- [NBT Compound / JSON Object]: The root object
- [String][NBT List / JSON Array] trades: Any number of villager trade(s) (an [String] ID, or a [String] tag with
#, or an [NBT List / JSON Array] array containing [String] IDs) to pick from. - [Int][Float][NBT Compound / JSON Object] amount: A number provider determining the amount of trades to generate when this set is used.
- [Boolean] allow_duplicates: (Optional, defaults to false) Whether a single trade can be selected multiple times.
- [String] random_sequence: The random sequence to use to generate trades. When unset, a non-deterministic random sequence is used.
- [String][NBT List / JSON Array] trades: Any number of villager trade(s) (an [String] ID, or a [String] tag with
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 26.1 | snap1 | Added trades sets. | |||||
Navigation
Sources
- Trade set — Minecraft Wiki, CC BY-NC-SA 3.0, revision 3691171.