Data Trader

Data Trader

A villager like entity which can be used as trader. Customizable with data packs.

by
6.2K Downloads
forgeneoforgeadventure
Rent Server with this Mod

About this Mod

Porting information for 26.1 update
#StandWithUkraine

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:
  • buy
  • sell

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.

Available Versions

DataTrader-21.1.0.jarrelease
MC 1.21.1neoforge
January 10, 2026

How to Install Data Trader on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set forge Loader

In the panel under "Egg", select the forge loader and matching Minecraft version (1.21.1).

3

Install Mod

Open the mod browser in the dashboard and search for "Data Trader". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

forgeneoforge

Minecraft Versions

1.21.1, 1.20.1, 1.19.3 (+4 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Data Trader server crashes on startup – what to do?

Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.

Is Data Trader compatible with forge and neoforge?

Data Trader officially supports forge, neoforge for Minecraft 1.21.1, 1.20.1, 1.19.3. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Data Trader – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Data Trader consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Data Trader with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
Apache License 2.0
Server-side
Required

Supported Versions

1.21.11.20.11.19.31.19.21.19.11.191.18.2