Skip to content

All configuration calls made before initialization will return defaut values - #103

Open
Cjsah wants to merge 1 commit into
AppliedEnergistics:1.20.1from
Cjsah:1.20.1
Open

All configuration calls made before initialization will return defaut values#103
Cjsah wants to merge 1 commit into
AppliedEnergistics:1.20.1from
Cjsah:1.20.1

Conversation

@Cjsah

@Cjsah Cjsah commented Aug 5, 2026

Copy link
Copy Markdown

I created a DelegateConfigValue that returns the default value if it hasn’t been initialized.

It bypasses the ForgeLoader check in dev env.

if (!FMLEnvironment.production) {
    Preconditions.checkState(this.spec.childConfig != null, "Cannot get config value before config is loaded.\nThis error is currently only thrown in the development environment, to avoid breaking published mods.\nIn a future version, this will also throw in the production environment.\n");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant