No ratings yet
Be the first to rate it.
Community listing page
Community listing page, reviews may not be monitored by the author.
Community voices
Reviews
Log in to review this mod
Reviews are written by ModDex members. Log in and you'll come right back to the review form.
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Must be installed on both the client and the server.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Data Trader
A mod which adds a new trader to the game. This trader can be modified with a datapack. This is being used to set the trades the trader will use. This is mainly for modpacks and not to be used by the normal end user who just wants to add a few mods together and play it. It's meant to be customized! More information about how to use it in the wiki/readme on github
Porting information for 26.1 update
Data Trader
A mod which adds a new trader to the game.
Defining the trades
File structure
The trader can receive an ID for a trader offers "recipe". This is a list of single trader offers. An example
file could look like this:
1.20.1
{
"Offers": [
{
"buy": {
"tag": "forge:gems/diamond",
"count": 3
},
"buyB": {
"item": "minecraft:wooden_pickaxe"
},
"sell": {
"item": "minecraft:diamond_pickaxe",
"nbt": "{Damage:0,Enchantments:[{id:\"minecraft:efficiency\",lvl:2},{id:\"minecraft:unbreaking\", lvl:10}]}"
},
"rewardExp": false,
"xp": 0
}
]
}
1.21.1
{
"Offers": [
{
"buy": {
"count": 1,
"items": {
"item": "minecraft:wooden_pickaxe"
}
},
"buyB": {
"count": 3,
"items": {
"tag": "c:gems/diamond"
}
},
"sell": {
"components": {
"minecraft:enchantments": {
"levels": {
"minecraft:efficiency": 2,
"minecraft:unbreaking": 10
}
}
},
"count": 1,
"id": "minecraft:diamond_pickaxe"
}
}
]
}
This example includes only one merchant offer. The trader will sell the item in sell.
The player needs to provide the item in buy and buyB to receive the item.
maxUses is the amount of times the player can use this trade before the trader needs to restock.
If rewardExp is true, the player will receive xp points for each trade, amount defined in xp.
The following values are required:
buysell
The default values are:
| Name | Default value |
|---|---|
buyB |
Air |
rewardExp |
false |
xp |
0 |
Where to put it in?
You use a data pack to provide these files. These are located at <modid>/trader_offers/. An example can be found
here.
How to use?
You spawn the trader using the /summon command, or by using the spawn egg. After this, you use the command
/datatrader setOffer @e <modid>:<path> to set the recipe. This can also be done by datapacks.
For a normal trader, I recommend setting NoAI to true.
You can also summon a trader with a specific trading table by using the
command /datatrader summon ~ ~ ~ <offer_id> <NoAI>
Setting custom skin overlay
Just put a texture to <modid>:textures/entity/trader/<offer_id path>.png. This texture should be something like the
profession overlay texture, e.g. minecraft:textures/entity/villager/profession/cleric.png.
You are allowed to put this mod in any modpack you like.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
Stats
- Downloads
-
20k
13k
6k
- Used in
- 4 modpacks
- Followers
- 0
- In stacks
- 0
- Created
-
- Last synced
-
Dec 5, 2026 2:32 AM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before the above date changes.
How syncing works
External Links
Stats
- Downloads
-
20k
13k
6k
- Used in
- 4 modpacks
- Followers
- 0
- In stacks
- 0
- Created
-
- Last synced
-
Dec 5, 2026 2:32 AM UTC
New file updates sync automatically.
When ModDex last fully re-synced this project from CurseForge or Modrinth. A new file release triggers a resync usually within minutes, and every project is also re-synced on a schedule. Edits that don't ship a file, such as a new description or screenshots, are checked every few hours and can appear before the above date changes.
How syncing works