The-Aether-Team / The-Aether

The original "The Aether" mod, rewritten and ported to modern Minecraft versions.
https://modrinth.com/mod/aether
GNU Lesser General Public License v3.0
343 stars 110 forks source link

Feature Request: Make various Book of Lore methods more easy to access #1928

Open Zepalesque opened 8 months ago

Zepalesque commented 8 months ago

What Feature Types Apply to This Request?

System

Other Type

No response

Is This an Enhancement to a Preexisting Feature?

What Is Your Feature Request?

It would be helpful if LoreBookMenu.LORE_ENTRY_OVERRIDES was public, rather than being private, along with LoreBookMenu.getLoreEntryKey() and LoreBookMenu.loreEntryKeyExists() methods being static, as they do not appear to need to be non-static. An additional potentially helpful change would be to change the Predicate<ItemStack>s to ItemPredicates with an additional NbtPredicate in order to allow them to be saved to json.

Why Should It Be in the Mod?

So that addon creators can more easily use the book of lore entries. My specific use case is I am trying to implement a system that saves all of the book of lore entries you have viewed before, so that you can look at them again without needing to re-insert the same item.

Does This Feature Improve Compatibility With Another Mod?

No response

Please Read and Confirm the Following

Zepalesque commented 8 months ago

Oh right, so something I just thought of related to this that would also be potentially helpful is a way to get a sort of ’example’ item stack from a lore entry translation key, although some lore overrides could potentially have multiple potential itemstacks so maybe a ‘default display’ item stack idk exactly how feasable it is and I may be able to find an alternate way if it isn’t but yeah

another thing related that could be good is maybe the lore overrides should be put into a new registry with RegistryObjects, so that maybe instead of the translation key you could instead get it from a ResourceLocation that could also help with the first idea because then the class could have a method to give that sort of general example of the lore override as an item stack

idk if that’s all super feasable though, but if making a pull request for it would make it more likely then I could do that, especially because I now have a pretty good idea for how it could work lol

bconlon1 commented 8 months ago

If you make a PR for it, it would likely be considered a breaking change, but I would be interested in seeing it so you could make it and it could be saved for 1.20.2.

Zepalesque commented 5 months ago

heck I forgot I need to do this still lol can probably do this soon if I can remember my complex plan of how to do it, that is :joy: