Data Trades
With Data Trades, server owners rewrite villager trades by writing JSON files in a datapack instead of editing code.
What it does
Trades for a villager profession can be overwritten through a JSON file that follows a set pattern. The file holds an object with properties, and its levels property is a map with numeric keys, where 1 stands for Novice and 5 for Master. Every level key holds the list of trades offered at that stage, so the number of trades per level and the items exchanged are defined directly in the file. The wandering trader can be overwritten the same way, with a file of its own. Vanilla spawns it with five generic trades and one rare trade, and both groups count as overwritten through the same format used for villager levels.
Data Trades adds a few optional properties to the standard Ingredient format that vanilla uses. An ingredient can take the form of an item tag in place of the vanilla Ingredient JSON, so a trade can ask for any member of a tag. A trade object can also reference an external trade by string ID through its TradeLevel property, so trades are saved under their own path, organized, and reused across professions. A command lets developers refresh loaded villagers and trigger a manual reassignment of their trades.
Key features
Profession trade overwrites
A JSON file targeting a villager profession replaces that profession's trades for each level.
Wandering trader overwrites
The wandering trader's five generic and one rare trade can be replaced with a file in the same format.
Tag-based ingredients
An item tag can stand in for a vanilla Ingredient, and one random member of the tag is taken for each trade.
Reusable trade references
A trade can point to an external trade by string ID, so shared trades are stored once and reused.
Manual reassignment command
A command refreshes loaded villagers and reassigns their trades, which helps when developing datapacks.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
How it compares
Data Trades is server-side only, open source under the CC0 1.0 Universal license, and published for 1.19.2 – 1.21.1 across Fabric, Forge and NeoForge. Custom Villager Trades is also server-side only and covers Fabric and Forge, but it is not open source and is published for 1.16.5 – 1.20.4. EMI Trades is client-side only, open source under the MIT License, and runs on Fabric, Forge, NeoForge and Quilt for 1.18.2 – 1.20.4, so it changes how trades are displayed rather than what they are.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| Data Trades | Fabric, Forge and NeoForge | 1.19.2 – 1.21.1 | Server-side only | 2024-08-20 |
| Custom Villager Trades | Fabric and Forge | 1.16.5 – 1.20.4 | Server-side only | 2024-05-30 |
| EMI Trades | Fabric, Forge, NeoForge and Quilt | 1.18.2 – 1.20.4 | Client-side only | 2024-01-13 |
Questions
Does Data Trades need to be installed on the client?
Which loader should be used for Data Trades?
Can a trade ask for any item from a group?
In the catalog
Data Trades is one of 2,072 Economy mods on ModsFinder, and one of 1,159 Economy mods for Fabric. 32,366 mods support Minecraft 1.21.1.
More from possible_triangle
Similar mods
What the author says
This mod adds the ability for players, serverowners or modpack creators to overwrite villager trades using datapacks. The amount of trades per level and the actual items traded can be customized using json files. A command for development purposes called /villagers refresh will manually trigger a re-asign of trades…
Official listing
- Modrinth page
- modrinth.com/mod/data-trades
- Owner
- possible_triangle
- Published
- 2023-07-19
- Updated on Modrinth
- 2024-08-20
- Facts verified
- 2026-10-15
