Data Trades

Quick rating

Community listing page, reviews here may not be monitored by the author.

Data Trades

No reviews yet

Allows easy customization of villager trades using datapacks

Economy & Trade Systems
Mod Loaders
Forge
NeoForge
Fabric
Minecraft

Community voices

Reviews

List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Show per page
10
25
50
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Server Only

Runs entirely on the server. Also works in singleplayer.

About

Project Details

Type
Mod
License
Creative Commons Zero v1.0 Universal
Latest Version
Fabric 3.0.1

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

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.

Examples

Datapacks with examples can be found here.

JSON-Schema

More information about the actual JSON schema and properties can be found here

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

Screenshots

Gallery

This project has no gallery images yet.

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.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~25,000
Total Downloads
CurseForge
~3,000
Modrinth
~22,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works