Logo
MINECRAFTBIBLE
Items
Items

All game items

Blocks
Blocks

Building blocks

Mobs
Mobs

Creatures & monsters

Biomes
Biomes

World biomes

Structures
Structures

Generated structures

Recipes
Recipes

Crafting guides

Advancements
Advancements

Achievements

Loot Tables
Loot Tables

Drop rates

Tags
Tags

Item groupings

All Versions
View all data →
Capes
Cape ArchiveNEW

Browse rare Minecon capes, OptiFine capes, and custom capes from players worldwide

Browse

Player Database
Player DatabasePopular

Search any player

Skin Browser
Skin Browser

Browse & download skins

Cape Gallery
Cape GalleryNEW

Minecon & OptiFine capes

Seed Vault
Seed Vault

Curated seeds

Learn

Guides
GuidesNew

Tutorials & tips

Blog
Blog

News & updates

Community

Community Hub
Community HubHub

Posts, discussions & more

All Versions
View community →
Seed Analyzer
Seed Analyzer

World seed analysis

Loot Explorer
Loot Explorer

Drop rates

Crafting Calculator
Crafting Calculator

Material planning

Enchant Calculator
Enchant Calculator

Probability math

Redstone Lab
Redstone Lab

Signal timing

Trading Profit
Trading Profit

Villager ROI

All Versions
View all tools →
Mods
Mods

Browse all mods

Plugins
Plugins

Server plugins

Resource Packs
Resource Packs

Textures & sounds

Shaders
Shaders

Visual enhancements

Datapacks
Datapacks

World logic

Scanner
Mod Intelligence

Scan & analyze any mod

All Versions
View all mods →
Loading...
IntroductionIntroductionVersion HistoryVersion HistoryGuidesGuidesBlog & NewsBlog & News
ItemsItemsBlocksBlocksMobsMobsRecipesRecipesBiomesBiomesStructuresStructuresAdvancementsAdvancementsLoot TablesLoot TablesTagsTags
ModsModsPluginsPluginsResource PacksResource PacksShadersShadersDatapacksDatapacks

MinecraftBible

The Ultimate Wiki

Logo
MINECRAFTBIBLE

The ultimate Minecraft reference. Every item, block, mob, and recipe documented with precision.

Community

  • Player Database
  • Skin Browser
  • Cape Gallery
  • Community Hub
  • Seed Vault

Database

  • Items
  • Blocks
  • Mobs
  • Recipes
  • Biomes
  • Structures

Tools

  • Seed Analyzer
  • Mod Intelligence
  • Crafting Calculator
  • Enchant Calculator

Mods & Packs

  • Mods
  • Plugins
  • Resource Packs
  • Shaders
  • Datapacks

© 2026 MinecraftBible. Not affiliated with Mojang or Microsoft.

PrivacyTermsContact
Data Trader
ModApache-2.0

Data Trader

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

5.1K
Downloads
5
Followers
3 months ago
Updated
📦
20
Versions
adventureforgeneoforge
Download Latestv21.1.0View on Modrinth

📖About Data Trader

Porting information for 1.21 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.

👥 Team & Contributors

MelanX
MelanXOwner

⚙️ Compatibility

Environment
✅ Client & Server
Loaders
forgeneoforge
Minecraft Versions
1.21.1

🔗 Links

Modrinth Page