Malorolam / LootBags

Other
21 stars 31 forks source link

[Feature Request] Allow wildcards in config files #118

Closed glindsey closed 6 years ago

glindsey commented 6 years ago

It would be super useful to be able to use wildcards as part of the item names -- in the whitelist/blacklist sections, for example. I'd love to be able to just say "actuallyadditions:item_misc:*" instead of having to manually specify each metadata value.

Malorolam commented 6 years ago

Will be added next version for blacklists. I cannot do this for whitelists as frequently mods use metadata values as intermediate steps or non-functional items.

glindsey commented 6 years ago

Ah, that makes sense. Any way you could do something like actuallyadditions:item_misc:[1, 2, 3] et cetera? I know it's a bit of parsing work, but it would still cut down a ton on repetition in the config file. (If not, no big deal!)

Malorolam commented 6 years ago

I already have parsing for that. The damage range can be a single integer, for a single damage value, or a collection of integers, &s, and #s. A # indicates a skip between two numbers, and an & indicates inclusion between two numbers. For example, 0&5#8&10 uses the damage values 0, 1, 2, 3, 4, 5, 8, 9, 10.

glindsey commented 6 years ago

Excellent! One other related question, if you don't mind: I have a family server set up, and I've been tweaking the lootbags.cfg file so bag contents make a bit more sense with all the mods we have running. JEI only seems to update the lootbag contents if I update the config file on the client. If I only update the server copy, JEI doesn't reflect the changes. Is this expected behavior?

glindsey commented 6 years ago

Hey, since you answered my other question, and my new one is unrelated, I’ll close this issue. No point in cluttering up stuff for you 😁