SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
✓ VerifiedCreatures & NPCs

Data Trades

by possible_triangle · for Minecraft

Allows easy customization of villager trades using datapacks

32KDownloads
2 yr agoLast updated
CC0-1.0License
Fabric · Forge +1Loaders

About Data Trades

From Modrinth

Allows easy customization of villager trades using datapacks

[ISSUES]: https://github.com/PssbleTrngle/DataTrades/issues

[DOWNLOAD]: https://www.curseforge.com/minecraft/mc-mods/data-trades/files

[CURSEFORGE]: https://www.curseforge.com/minecraft/mc-mods/data-trades

[MODRINTH]: 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/[namespace]/villager/professions/[path].json

[namespace] and [path] 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 here.

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 | NumberProvider | 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 | LootFunction[] | [] | | 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 1 being Novice until 5 being Master.

Advanced Usage

Instead of a Trade object, the TradeLevel trades property can also contain string IDs referencing an external trade. These trades can be saved under the path below to organize & reuse them.

data/[namespace]/villager/trades/[path].json

Highlights

From source data

Game versions

Supports 3 Minecraft versions, the newest being 1.21.1.

Loaders

Runs on Fabric, Forge and NeoForge.

Footprint

Rated a light load on a server.

What kind of mod it is

From the catalog
Listed on Modrinth as “Mods”

Creatures & NPCs

Adds or changes creatures, NPCs and how they behave.

Runs on your server

From source side support

Modrinth lists Data Trades as required on the server. Check its Modrinth page to see whether players need it too.

Compatibility

Game
Minecraft
Loaders
FabricForgeNeoForge
Runs on
Serverrequired on the server
Game versions
1.21.1 and 2 earlier

Verified at the source

  • ✓ModrinthOfficial listing, checked 2026-10-01Open ↗
  • ✓Authorpossible_triangle, as published on Modrinth
  • ✓LicenseCC0-1.0Free

Data Trades, answered

Generated from the mod’s own source data.

Do my players need to install Data Trades?

Modrinth lists Data Trades as required on the server. Check its Modrinth page to see whether players need it too.

Which loaders does it support?

Fabric, Forge and NeoForge.

Is it free?

Yes. Data Trades is free to download from Modrinth. Its license is CC0-1.0.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run Data Trades on a Minecraft server.

Deploy in about a minute from $4.20 a month, then add Data Trades in one click.