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
Concerns 1.15.2
Problem
In
ModLoader
, theloadMods
method loads mod configs just after the constructor and before setup/sided setup/imc (the last of which comes underfinishMods
and runs afterloadMods
).Therefore config cannot be loaded with generated data, at least when using Forge's Nightconfig.
Possible Solutions