Data Trades
⚪ Last updated 2024⚠️ Install Order · 2 steps
Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.
Preview

🔍 Analysis
- 👍 0.2% endorsement rate
- 🏆 #8 of 21 economy mods in this game by downloads
📋 About This Mod
: https://github.com/PssbleTrngle/DataTrades/issues : https://www.curseforge.com/minecraft/mc-mods/data-trades/files : https://www.curseforge.com/minecraft/mc-mods/data-trades : https://modrinth.com/mod/data-trades # Data Trades 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 to all loaded villagers. ## Folder Structure Using a datapack, the trades of a specific villager profession can be overwritten by creating a JSON file following this pattern: ``` data//villager/professions/.json ``` `` and `` should be overwritten by the specific villager professions ID. For example, to create trades for the `minecraft:fletcher` profession, a file under `data/minecraft/villager/professions/fletcher.json` should be created. It's content should follow the (#profession) Schema Similar, the wandering trader can be overwritten by adding a file at ``` data/minecraft/villager/traders/wandering.json ``` following the (#trader) Schema ## Examples Datapacks with examples can be found (https://github.com/PssbleTrngle/DataTrades/tree/1.19/datapacks). ## JSON Schema The JSON file should contain an object with these properties: ### *Profession* | Property | Type | Default | Description | |----------|-----------------------|---------|----------------------------| | levels | *map<int,TradeLevel>* | `{}` | *see below* | The `levels` object takes the form of a map with numeric keys and object values. The keys represent the actual villagers level with *1* being *Novice* until *5* being *Master*. ### *Trader* | Property | Type | Default | Description | |----------|--------------|---------|----------------| | generic | *TradeLevel* | `null` | generic trades | | rare | *TradeLevel* | `null` | rare trades | In vanilla minecraft, each wandering trader chooses 5 generic and 1 rare trades once it spawns. Both the trades themselves and their count can be overwritten using the same format as the one used for a villager's level. ### *TradeLevel* | Property | Type | Default | Description | |----------|---------------------------------------------------------------------------------------|---------|---------------------------------------------------------------| | take | *(https://minecraft.wiki/w/Loot_table#Number_provider)* | `null` | amount of trades added by this level | | trades | (*Trade* \| *string*) | `` | list of trades from which the taken ones are randomly choosen | ### *Trade* | Property | Type | Default | Description | |-----------------|---------------------|---------|--------------------------------------------| | disabled | *boolean* | `false` | disabled trades will be ignored | | sells | *TradeIngredient* | `` | item sold to the player | | wants | *TradeIngredient* | `` | maximum of two items the player has to pay | | uses | *int* | `0` | | | maxUses | *int* | `10` | | | xp | *int* | `1` | | | priceMultiplier | *float* | `2.0` | | | demand | *int* | `0` | | ### *TradeIngredient* Extension of the vanilla `Ingredient` with a few extra properties. They can take the form of an item or tag and specify all properties of the vanilla Ingredient JSON. Since Villager trades are `ItemStack` based that does not mean that a player can pay a `#minecraft:stone_tool_materials` with any stone type, but only the one that is randomly selected from the tag each time the trade is used. | Property | Type | Default | |-----------|---------------------------------------------------------------------|---------| | functions | *(https://minecraft.wiki/w/Item_modifier)* | `` | | count | *int* | `null` | The `levels` object takes the form of a map with numeric keys and object values. The keys represent the actual villagers level with
: https://github.com/PssbleTrngle/DataTrades/issues
: https://www.curseforge.com/minecraft/mc-mods/data-trades/files
: https://www.curseforge.com/minecraft/mc-mods/data-trades
: https://modrinth.com/mod/data-trades
# Data Trades
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 to all loaded villagers.
## Folder Structure
Using a datapack, the trades of a specific villager profession can be overwritten by creating a JSON file following this pattern:
``` data//villager/professions/.json ```
`` and `` should be overwritten by the specific villager professions ID. For example, to create trades for the `minecraft:fletcher` profession, a file under `data/minecraft/villager/professions/fletcher.json` should be created. It's content should follow the [Profession](#profession) Schema
Similar, the wandering trader can be overwritten by adding a file at ``` data/minecraft/villager/traders/wandering.json ``` following the [Trader](#trader) Schema
## Examples
Datapacks with examples can be found (https://github.com/PssbleTrngle/DataTrades/tree/1. 19/datapacks).
## JSON Schema
The JSON file should contain an object with these properties:
### Profession
| Property | Type | Default | Description |
|----------|-----------------------|---------|----------------------------|
| levels | map
The `levels` object takes the form of a map with numeric keys and object values. The keys represent the actual villagers level with 1 being Novice until 5 being Master.
### Trader
| Property | Type | Default | Description | |----------|--------------|---------|----------------| | generic | TradeLevel | `null` | generic trades | | rare | TradeLevel | `null` | rare trades |
In vanilla minecraft, each wandering trader chooses 5 generic and 1 rare trades once it spawns. Both the trades themselves and their count can be overwritten using the same format as the one used for a villager's level.
### TradeLevel
| Property | Type | Default | Description | |----------|---------------------------------------------------------------------------------------|---------|---------------------------------------------------------------| | take | (https://minecraft.wiki/w/Loot_table#Number_provider)* | `null` | amount of trades added by this level | | trades | (Trade \| string)[] | `[]` | list of trades from which the taken ones are randomly choosen |
### Trade
| Property | Type | Default | Description | |-----------------|---------------------|---------|--------------------------------------------| | disabled | boolean | `false` | disabled trades will be ignored | | sells | TradeIngredient | `[]` | item sold to the player | | wants | TradeIngredient[] | `[]` | maximum of two items the player has to pay | | uses | int | `0` | | | maxUses | int | `10` | | | xp | int | `1` | | | priceMultiplier | float | `2. 0` | | | demand | int | `0` | |
### TradeIngredient
Extension of the vanilla `Ingredient` with a few extra properties. They can take the form of an item or tag and specify all properties of the vanilla Ingredient JSON. Since Villager trades are `ItemStack` based that does not mean that a player can pay a `#minecraft:stone_tool_materials` with any stone type, but only the one that is randomly selected from the tag each time the trade is used.
| Property | Type | Default | |-----------|---------------------------------------------------------------------|---------| | functions | (https://minecraft.wiki/w/Item_modifier)*[] | `[]` | | count | int | `null` |
The `levels` object takes the form of a map with numeric keys and object values. The keys represent the actual villagers level with
📊 Mod Details
- Game
- Minecraft Mods
- Author
- possible_triangle
- Version
- 3.0.1
- Downloads
- 28,043
- Endorsements
- 43
- Category
- economy
- Created
- 8/4/2023
- Updated
- 8/20/2024
- Game Versions
- 1.21.1
- Tags
- economy, management, utility
🔧 How to Install Minecraft Mods Mods
Download from Modrinth. Use Prism Launcher or drop into your mods folder.
📖 Full step-by-step install guide for Minecraft Mods →
Visit the official mod page for specific installation instructions for this mod.
🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.
❓ Frequently Asked Questions
Which Minecraft Mods versions does Data Trades support?
The author lists 1.21.1. Other versions may work but are untested by the author.
What is the latest version of Data Trades?
Version 3.0.1, published 2024-08-20 with 28,043 downloads recorded at the source.
Keep browsing — more Minecraft Mods mods await