Villager Trades
Datapack-driven NeoForge mod for replacing villager profession and wandering trader trades with custom JSON-defined trades.
截图
介绍
Villager Trades
Villager Trades is a lightweight NeoForge mod for Minecraft 1.21.1 that lets modpack makers and server owners define villager trades through datapacks.
Instead of hardcoding trade changes in Java or editing the mod itself, trades are controlled with JSON files. Each villager profession has its own file, and wandering trader trades are handled separately.
Features
- Add custom trades through datapacks
- Configure trades per villager profession
- Configure wandering trader trades
- Replace vanilla trades only when a matching datapack file exists
- Leave vanilla trades unchanged when no datapack file is present
- Enable or disable the mod’s trade functionality through a simple config option
- Works on both dedicated servers and singleplayer worlds
How It Works
Datapack trade files are placed under:
data/villagertrades/trades/
Supported profession files:
farmer.jsonfisherman.jsonshepherd.jsonfletcher.jsoncleric.jsonweaponsmith.jsonarmorer.jsontoolsmith.jsonlibrarian.jsoncartographer.jsonleatherworker.jsonbutcher.jsonmason.jsonnitwit.jsonwandering.json
If a valid profession file exists, that profession’s vanilla trades are removed and replaced with the trades from the JSON file.
If no file exists for a profession, that profession keeps its vanilla trades.
Wandering Trader
Wandering trader trades are configured with:
wandering.json
Entries can use:
"pool": "generic""pool": "rare"
If no pool is specified, the trade is added to the generic pool.
When wandering.json exists, vanilla wandering trader trades are replaced by the JSON-defined trades.
Config
The mod generates a common config file:
config/villagertrades-common.toml
The config contains:
enabled = true
When set to false, the mod does not change villager or wandering trader trades.
Example Trade
{
"trades": [
{
"level": 1,
"buy": { "item": "minecraft:emerald", "count": 1 },
"sell": { "item": "minecraft:diamond", "count": 1 },
"max_uses": 16,
"xp": 2,
"price_multiplier": 0.05
}
]
}
Notes
- Villager trades use levels from
1to5 - Minecraft datapack resource paths must be lowercase
- Trade files can contain either a JSON array or an object with a
tradesarray - This mod is intended for datapack-driven customization, modpacks, and server-side trade balancing
常见问题
Villager Trades 支持哪些 Minecraft 版本?
Villager Trades 支持 Minecraft Java 版 1.20–1.21.11,共 12 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
Villager Trades 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
Luc1fer1o 的其他作品
查看全部 →Way Better Leaves
Way Better Leaves is a client-side mod. It automatically gives vanilla and modded leaf blocks external X-shaped leaf panels using each block model's own leaf texture.
Crosshair Damage Indicator
Client-side NeoForge QoL mod that shows clean white damage numbers below your crosshair when your attacks, projectiles, or abilities damage nearby targets.
Accurate Fast Block Placement
Client-side NeoForge 1.21.1 mod that makes held right-click block placement faster and more accurate by timing placement attempts as your crosshair moves.
Accurate Fast Block Placement
Client-side NeoForge 1.21.1 mod that makes held right-click block placement faster and more accurate by timing placement attempts as your crosshair moves.
评论
登录后评论和评分