A5b84 / held-item-info

Fabric mod to show information (like enchantments) about the held item under its name
https://www.curseforge.com/minecraft/mc-mods/held-item-info
GNU Lesser General Public License v3.0
11 stars 6 forks source link

Suggestion: Support Lore Enchantments #1

Open fdigl opened 3 years ago

fdigl commented 3 years ago

Some servers add custom enchantments or extend the amount of levels an enchantment can go up to, hiding the enchantments and replacing them with identical-looking lore which renders this mod incompatible. Would it be possible to search the currently held item for lore that matches the following format, scanning from the first lore line to the first empty line?

§7{enchantmentName} {numeralOrNumber} (Start parsing) §7{enchantmentName} {numeralOrNumber} §7{enchantmentName} {numeralOrNumber} {empty} (End parsing) {Lore Lines}

A5b84 commented 3 years ago

That sounds doable, I also planned to add an option to display the item's lore (could be useful in case the parsing is too wonky :p )

Do you know names of plugins/mods that add enchantments like that? That could come in handy, I've already found Better Enchantments

fdigl commented 3 years ago

I do! EcoEnchants happens to do that while hooking into vanilla enchants in Essentials, making them easy to apply (source here: https://github.com/Auxilor/EcoEnchants)

A5b84 commented 3 years ago

I'll give it a look later, thanks :>

fdigl commented 3 years ago

Heads up, EcoEnchants just changed up how it displays enchants. If you have a certain amount of enchants, it consolidates enchants up to 2 per line I think

Image