Putting a conditionally-loaded entry in a conditionally-loaded category fails
LemmaEOF opened this issue ยท 2 comments
Mod loader
Fabric
Minecraft version
1.18.2
Patchouli version
1.18.2-71
Modloader version
Quilt Loader 0.17.0
Modpack info
No response
The latest.log file
https://cdn.discordapp.com/attachments/950847275549229086/989277373453205564/message.txt
Issue description
We've run into an issue in the Hexcasting discord related to conditional-loading flags for Patchouli categories and entries. The setup is as such:
- Hexcasting adds the category
hexcasting:interop
, based on the flaghexcasting:any_interop
which returns true if any of the interop-supported mods are loaded - Hexcasting adds the entry
hexcasting:interop/pehkui
, inside the categoryhexcasting:interop
and based on the flagmod:pehkui
- When none of the interop-supported mods are loaded, Patchouli doesn't load the
hexcasting:interop
category, because its flag condition isn't met - However, when trying to load the entry
hexcasting:interop/pehkui
, it deserializes and checks the category it should be added to before checking the entry's load flag, causing it to throw aRuntimeException
due to having an invalid category
The quickest solution for this would be to check an entry's flag before determining the category for it to load into. A more complex (and complete) solution could involve marking which categories have been skipped due to flags and skipping any entries meant to go in those categories.
Steps to reproduce
No response
Other information
I'm not sure where the resource reload listener for books is, so it may be a Fabric/Quilt-exclusive bug and it may not.
Patched back to the old behaviour, #549 tracks the long term improvement