Config loading before element registration
mccreery opened this issue ยท 0 comments
Concerns 1.15.2
Problem
In ModLoader
, the loadMods
method loads mod configs just after the constructor and before setup/sided setup/imc (the last of which comes under finishMods
and runs after loadMods
).
Therefore config cannot be loaded with generated data, at least when using Forge's Nightconfig.
Possible Solutions
- Ignore Forge's config system entirely - load from JSON or TOML directly after IMC or registry events have fired
- Pro: GSON available for easy JSON loading
- Pro: Less dependency on Nightconfig, easier to reason about
- Pro: Avoids clunky unintended usage of library
- Con: Files are unfamiliar and harder to read
- JSON:
- Make not intended to be read by users