Change Log (Custom Villager Trades) - SpaceCat97/SpaceCats-Wikis GitHub Wiki
Current Mod Version: | 24.0 |
---|---|
Current Minecraft Version(s): | 1.20+ |
LTS Minecraft Version(s): | 1.16.5, 1.18.2, 1.19.2 |
Fixed un-modified professions not returning any trades
Reworked trade replacement for better mod compatibility
Added "maxTrades" for villagers
Added "maxCommonTrades" and "maxRareTrades" for wanderer. Note that this only works when "removeOtherTrades" = true
Fixed wanderer trade check throwing an error when trying to add without replacing trades
Added error logging to chat - this should help those who struggle to read the latest.log
Backported the latest version of the mod
Fixed /exportCVT command to export correct request amounts
Added an internal property to all custom trades: UTID (Unique Trade ID)
- You do not need to put this in your config file. The mod will automatically add one
- This is intended for use alongside the new commands, allowing you to remove trades using their UTID
Added /addCVT command, you can now add trades ingame
Added /removeCVT command, this will remove CVT-ONLY trades
Fixed default generated trades. Please note that vanilla trades now need the "minecraft:" namespace
Re-implemented wanderer trades. The wanderer trades do not need the namespace. Simply put "wanderer" as the profession
Improved "priceModifier" - it will only modify the primary requsted item price
Added "priceModifierAdditional", which modifies the secondary requested item price
Added "multiRequest", works the same as "multiOffer" but for the primary request item
Added "additionalMultiRequest", works the same as "multiOffer" but for the secondary request item
Added "amountRange" for any trade item object (offer, request etc.), this will set a maximum limit for the amount number and set a random value. For example, if amount=1 and amountRange=5 then the final amount will be between 1 (inclusive) and 5 (exclusive)
Added command "exportCVT" - this is a basic export of registered trades. This is experimental and may not capture all trades
Fixed CVT not working with modded items
Fixed CVT not adding trades to modded professions
Improved error reporting for mismatched fields
MASSIVE rework to how trades are registered - if you set it to remove other trades, it will do so with no exceptions. The mod should also be slightly faster and less ram-consuming now
Changed reloadTrades command to "reloadCVT"
Removed max trade level limit - a warning message is displayed instead
Removed IMC support - this was forge-exclusive
Removed force levelup feature
Fix: If a random enchantment is the same as any that are already applied, it will reroll until it is not the same. It will attempt this 3 times before giving up
Fixed level checking, this will now work correctly
Updated to 1.19.2
Added a way for the logger to track the source of trades, used for debugging
Patched the tradeLevel logic, now if the tradeLevel is invalid it will throw an error on load. If it still makes it through for some reason, it will default to level 1
Please note that V16 for 1.18.2 does NOT have maps enabled due to forge not fully supporting the registry for this (changes were made by mojang)
Mod now pulls profession name from "profession" field inside file, instead of the file name. This should allow for better mod compatibility
Added /reloadTrades command - this is an experimental feature and could crash your game. USE AT YOUR OWN RISK Fixed 'true random' enchantment and effects crashing game when there are none available for the item
One change - explanation here:
All the trade events are registered before they're fired, and they are then ordered by priority. Highest are first and lowest are last
I've made it so my event is registered as "LOWEST" priority
Because most mods register their events as "NORMAL", it should mean that the majority of modded trades are removed when CVT trades are added. I've tested this and it seems to be working... However, there is still a chance that modded trades will be added, especially if they register their trades at "LOWEST" priority, or at some other point of mod loading. There's nothing I can do to control how other people add their trades unfortunately...
Added developer support
Added advanced NBT support
Check out the wiki for more information
Fixed incorrect data showing when an invalid effect is configured
Fixed maps not getting renamed.
Fixed wanderer trades not getting added if "removeOtherTrades" = false
Reworded error message to clarify that problem files should be placed through a JSON verifier AS WELL AS checked manually
Added capability to force an npc's levels up. To do this:
- You must be in creative
- Open the villager's trade menu
- Press the UP arrow on your keyboard
- Exit the trade menu.
This will force the villager's xp to the required level, and then trigger the top most trade (I can't find a way to do this without consuming a trade)
This will not work in survival.There is no "level down" functionality
Fixed null pointers for random effects (set default values too)
Added effect support for tipped arrows. - Only one potion effect can be applied. - If several are defined, it will default to the first one
Added "potionKey" field, a specific field to use for tipped arrows
- Potion keys are different to effect keys, ensure you use the correct one
- Supports "random" as a field value
Added "blacklistedPotionKeys" field, to use alongside "random" (if you want)
Made the demand field optional (default = 0)
Added "customName" field to the item object. This allows you to set your own display name for the item. I'd strongly recommend only using this field for the offer
Added effects field as an option. These work in almost the exact same way to enchantment fields. It has the same support for random effects
Added blacklistedEffects field as an option. Again, these work the same way as enchantment fields do
Please note that effects an only be applied to potion items or suspicious stew. If you try to do this with anything else, it won't work
Unfortunately, due to the way that suspicious stew is programmed by mojang, you can only apply 1 effect to it. If you declare multiple then only the last one will be applied
Added the ability to generate marked maps. To do this you must:
- Set the "itemKey" as "minecraft:filled_map"
- Define the "mapStructure" that you would like, eg: "mapStructure": "minecraft:buried_treasure"
- This works with modded structures too, as long as you know their registry key
See wiki for details on how to use these new features
Fixed null pointer crashes caused by not specifying the price modifier
Fixed null pointer crashes caused by not specifying any blacklisted enchantments
Fixed an itty bitty typo with the log output
Added some null checks that will output to console (to help with debugging configs)
Fixed enchantments and other config variables not being checked properly
Fixed enchanted books being enchanted during trade breaking the game (whoopsie!)
Added "priceModifier" variable to the Item Object (default = 0). When applied to the offered item, it will add this number to the price of the other trade objects (intended for multiItem trades). You can set this as a negative number too. (Optional field)
Added "maxEnchantmentLevel" variable to the Enchantment Object (default = 3). This sets the maximum possible level for this trade. (Optional field)
Added the ability to do random enchantment levels. To do this, set the enchantmentLevel (in the Enchantment Object) to -1. It will take the "maxEnchantmentLevel" field into consideration
Added an "advanced semi-random" enchantment function
- This allows you to add a field similar to "enchantments". It is called "semiRandomEnchantments"
- The mod will look at the enchantments objects in this field and choose one of them
- The benefit of using this to the normal "semi-random" method is that you can also set enchantment levels per-enchantment (instead of using one level for all)
- This will add enchantments alongside any defined objects in the "enchantments" field. Meaning you can have both defined and random enchantments on the same item
Added "blacklistedEnchantments" field inside of the item object. This will reroll the random enchantment if it lands on a blacklisted enchantment (simple!)
- The blacklistedEnchantments field is simply an array of strings
- Note that this only applies to enchantmentKey fields with a value of "random"
Fixed issue with enchanted books not working as enchanted books should work (when purchased from a villager)
Fixed issue with example trade not generating on first load
Added random enchantments
- To do this, put "random" as the enchantment key (do not put "minecraft:" at the start)
- This will choose from all applicable enchantments for the item specified. It will not randomize the level
Added semi-random enchantments. This means you can specify a list of enchantments to be added, and one will be chosen
- To do this, put multiple enchantment keys in the "enchantmentKey" entry, separated by a hash (#)
- The level will stay as whatever you specify it
Added the option to add multiple offers to choose from. This will override the "offer" field
The field is called "multiOffer" and is an array of "Trade Item" objects. The mod will take all of these items in to consideration and select one for that specific trade. This allows for several variants of the same trade without affecting the weight of the trade (how common it is).
You can now modify wanderer trades! To do this search for the folder "config/custom trades/wanderer" and create a JSON in there called "wanderer.json"
One slight difference between the wanderer trades and the existing villager trades is that you need to add a field called "isRare" and set it to either true or false
TradeLevel does not matter for the wandering traderWARNING: You MUST have at least 5 common and 1 rare trade in order for this to work. If you do not, then your wander trades won't be added
If you are not removing existing wanderer trades, you do not need to worry about the above warning
The old config file is is still generated, but with a different comment. This is to retain the compatiability with V2 and earlier configs. The mod will still check and convert old trades
Added an option to remove vanilla trades and only use what is defined in the config file (per profession)
Enchantments have been reworked (you can now have multiple), you will now need to redo your config files for enchantments. If you do not then your game will still add the item, but without the enchantment. See wiki for details on how to add enchantments
Fixed problem with custom professions added by other mods, and another crash? Skipped V3 due to bugs
Fixed incorrect import. This will fix the java.lang.NoClassDefFoundError: org/codehaus/plexus/util/StringUtils issue.
First release!