Custom Villager Trades - SpaceCat97/SpaceCats-Wikis GitHub Wiki
This mod:
Curseforge - Forge version
Curseforge - Fabric version
Required Mods:
Architectury
Discord: Click here.
Click here for the change log.
- If you have any errors, check out the latest.log - it will tell you what's wrong. I will ask you to check this if you ask me for support, so save yourself a step!
- You can find a list of vanilla trades here
- This mod does not give you the option to create trades for villagers who have no profession/unemployed.
- This mod does not increase the number of trades a villager can have.
- Your trade is not guaranteed to appear every time - this is because of the trade pools. You can however remove existing trades.
- If you are unsure what the item ID is, press f3+h ingame to enable tooltips and hover over the item you want to add.
- If you have any problems launching the game with a custom config, please first start the game without a config and see if it goes to the title screen. If it does then your config is not formatted correctly. There will also be an error message in the console/log if it is caused by custom villager trades.
- If you remove a trade that a villager already has, the villager will still keep that trade because it is stored in the NBT.
- The wanderer must have a minimum of 5 "common" and 1 "rare" trades.
- You can see commands and their formatting here
Need further help? Check out the examples provided, then reach out to me on discord.
- A fully customizable trade creation system where you can define basic or advanced trades using JSON.
- Modify trades for any profession using a simple named config file (excluding the nitwit).
- You can set "global" trades, these will be applied to any villager that can trade (call the config file "all.json")
- Trades can be applied based on level.
- All aspects of the trade can be modified (trade experience, discounts, etc.)
- Enchantments can be applied to any trade item. This allows for whacky unique items that can't be acquired via normal (vanilla) means.
- Enchantments can now be randomized in 3 ways, read below.
- Enchantments can be blacklisted, usable with random enchantment feature.
- Modded item and block support.
- Modded profession support - you can add trades to other people's villagers.
- Remove all vanilla trades - you can do this per-profession.
- Vanilla wanderer trades can be modified/replaced.
- Custom potion trades, including random and blacklisted.
- Custom suspicious stew trades - CURRENTLY BROKEN
- Custom treasure map trades (with modded structure support) - CURRENTLY BROKEN
- Custom tipped arrow trades (with modded potion effect support). Includes random and blacklisted.
- Custom potions and tipped arrows can be coloured.
- Custom NBTs (basic and advanced).
- Mod support.
- /reloadCVT command to use ingame - EXPERIMENTAL FEATURE
- /exportCVT command to export available trades - EXPERIMENTAL FEATURE
- /addCVT command to add new trades ingame - EXPERIMENTAL FEATURE
- /removeCVT command to remove CVT ONLY trades ingame - EXPERIMENTAL FEATURE
Field Name | Data Type | Required | Description | Default Value |
---|---|---|---|---|
profession | String | ![]() |
The profession to be modified, this is a key value _(eg. minecraft:farmer)_ | |
removeOtherTrades | Boolean | ![]() |
If true, all trades will be removed and only CVT trades will be available to the villager | false |
maxTrades | Whole Number | ![]() |
Define a custom amount of trades the villager can have per-level | 2 |
maxCommonTrades | Whole Number | ![]() |
WANDERER ONLY - Define a custom amount of common trades the wander can have | 5 |
maxRareTrades | Whole Number | ![]() |
WANDERER ONLY - Define a custom amount of rare trades the wander can have | 1 |
trades | Trade Object Array | ![]() |
Each entry in this array will define a trade |
Random Enchantments
Effects
Specific Items
Wanderer Trades
- Normal Trade - link
- MultiOffer - link
- Basic NBT - link
- Advanced NBT - link
- Random Enchantment - link
- Blacklisted Enchantments - link
- Semi-Random Enchantments - link
- Advanced Semi-Random Enchantments - link
- Potion - link
- Blacklisted Effects - link
- Suspicious Stew - link
- Map - link
- Tipped Arrows - link
- Wanderer - link
If your config entry is not created properly, the mod will throw a warning explaining what is wrong with that entry. It will then try to add the rest of the trades. This is an example of what you would see if there is a problem:
[14:26:03] [Worker-Main-9/INFO] [customvillagertrades/]: Checking custom villager trades...
[14:26:03] [Worker-Main-9/WARN] [customvillagertrades/]: Unable to add a custom trade! Reason: item/block does not exist - dotcoinmod:ironcoin
[14:26:03] [Worker-Main-9/INFO] [customvillagertrades/]: Check complete!
If you don't know the JSON language, please take the time to learn it before coming to me with problems - it is an easy language to learn, read and understand.
If you are having any more issues, you can create a ticket for help on this wiki (click "issues" at the top of the page).