[SUGGESTION] Add a blacklist or toggle in the configs for loot tables.
Clark919 opened this issue ยท 5 comments
Currently the mod allows for runic and unique weapons to spawn in a lot of low tier structures by default. While the ability to restrict all weapons from the mod from appearing in village chests is nice, it would be better if the user could configure what particular structures would spawn certain tiers of weapon, especially within modpacks.
For example, if the player wants to disable unique and runic weapons from appearing in villages, ruined portals, and a modded structure that appear very frequently in their world (and therefore, have a better chance of giving an OP weapon early), they would add the namespaced IDs of these structures to a JSON file that specifies to remove these types of weapon from those loot pools.
I've had this issue myself while developing a pack, and it becomes a pain to manually re-create loot tables or blacklist these items one-by-one or with an external scripting mod, so the ability to choose before the loot tables are registered would be ideal.
Thanks for the feedback!
I think this makes a lot of sense as a feature implementation. I'll see what I can do ๐
I've been working on implementing this suggestion and just wanted to provide an update on the progress.
In addition to the existing config files, a new config has been added, named 'loot_config'.
The mod will still try to inject its loot into any loot tables that contain the text "chests" in the path, but any values in the loot_config will override this.
This config starts with a list of examples and can be added to freely by the end user.
Each line of the config requires a string for the namespace/path/filename, as well as a float for the dropchance. Example below:
"minecraft:chests/ruined_portal": 0.0,
The above example would override the loot injection code on my end, resulting in the ruined portal having %0 chance to drop unique items, as denoted by the float value.
This config can be used as both a blacklist and a whitelist. Here's an example of a config value that would allow for unique weapons to drop from Withers with a %75 chance:
"minecraft:entities/wither": 0.75,
This level of fine tuning will only be available for unique weapons, not the standard iron>diamond gear drops, as I don't want to bloat the configs much more than they already are. The global modifiers in the general_config should be used be used for these items.
This is exactly what I was looking for, really great work. I understand not needing to configure the iron > diamond gear drops to avoid bloat, but will the configs include both unique and runic weapons? These two tend to be the sort of weapons I consider to be "endgame" gear, in the sense that they are typically equivalent to Netherite or better, and as such you wouldn't want players to encounter them early unless they take risks. So would the config allow the opportunity to specify drop chances in loot tables for both unique and runic weapons?
Glad to hear it!
I should have prefaced that runic items have been completely removed from the loot tables a couple of updates ago. It didn't make much sense for them to be directly obtainable, as they can be crafted using the Runic Tablets.
Having them only be craftable effectively gates the runic content behind the vanilla barrier of obtaining Netherite gear - I think this works pretty well for general gameplay.