Skip to content

Data Trader

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

NeoForgeForge
Loaders
NeoForgeForge
Downloads on Modrinth
7.3K
Followers on Modrinth
6
versions
20
Updated
January 10, 2026Jan 10
Published
in 2022

At a glance

Runs on NeoForge and Forge
For Minecraft 1.20.1, 1.21.1 …
Needed in the game and on the server
Latest version — 21.1.0 from January 10, 2026
Requires LibX
License Apache-2.0 — free
Where it's needed
In gamerequiredOn serverrequired

Needed both in the game and on the server

Game versions1.18.2–1.19.3, 1.20.1, 1.21.1

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:

NameDefault value
buyBAir
rewardExpfalse
xp0

Where to put it in?

You use a data pack to provide these files. These are located at `/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 :to set the recipe. This can also be done by datapacks. For a normal trader, I recommend settingNoAItotrue`.

You can also summon a trader with a specific trading table by using the command `/datatrader summon ~ ~ ~ <offer_id> `

Setting custom skin overlay

Just put a texture to `: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.

FAQ

How to install Data Trader?

Install NeoForge for your Minecraft version, download Data Trader for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does Data Trader support?

Data Trader has builds for Minecraft 1.18.2–1.19.3, 1.20.1, 1.21.1.

Is Data Trader needed on the server?

Needed in the game and on the server

License and source
Apache License 2.0free to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More