SimpleJsonVillagerTrades
No reviews yet
About as simple as it sounds, a small jij-able library to modify/add/remove Villager trades via datapacks.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
Simple JSON Villager Trades
As simple as it sounds, a small jij-able/standalone library to modify/add merchant trades via datapacks.
For Datapackers
You are able to modify merchant trades through JSON files the data/<namespace>/trade_offers/ directory.
For example:
{
"__COMMENT": "This adds a ruined portal map to the Cartographer's trades.",
"profession": "minecraft:cartographer",
"replace": false,
"offers": {
"apprentice": [
{
"type": "minecraft:sell_map",
"price": 5,
"name_key": "filled_map.ruined_portal",
"feature_tag": "minecraft:ruined_portal",
"icon": "target_x",
"max_uses": 10,
"experience": 2
}
]
}
}
For more tutorials and more information on modifying merchant trades, see the wiki.
Compatibility
SJVT uses Minecraft's hardcoded trade map as a base for the datapacks to build on top of, so it should work with most mods, even those who add new villager professions.
You can also export the hardcoded map (including non-native support mods) as a datapack by running the sjvt:build command.
For Mod Developers
You can include the mod using the following repository and dependency in your build.gradle (where [TAG] is the latest version):
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation include("maven.modrinth:sjvt:[TAG]") //To include (jij) in your mod
modImplementation "maven.modrinth:sjvt:[TAG]" // To require the mod to be installed seperatly
}
Custom Trade Offer Factories
To create a trade offer factory, implement the SerializableTradeOfferFactory interface.
Then register the codec to the TradeOfferFactories.TRADE_OFFER_FACTORY_REGISTRY registry.
You can also use methods and fields in the CodecHelper class to assist in the creation of codecs.
Then see 'For Datapackers'
Screenshots
Gallery
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
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers