Skip to content

Commit

Permalink
FIx MModdingModInitializer And MModdingClientModInitializer
Browse files Browse the repository at this point in the history
  • Loading branch information
FirstMegaGame4 committed Jul 31, 2023
1 parent 97ca93b commit a67d6e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ public interface MModdingClientModInitializer extends ClientModInitializer {
@Override
@MustBeInvokedByOverriders
default void onInitializeClient(ModContainer mod) {
this.getClientElementsInitializers().forEach(ClientElementsInitializer::registerClient);
if (this.getClientConfig() != null) {
this.getClientConfig().initializeConfig();
MModdingLibClient.CLIENT_CONFIGS.put(this.getClientConfig().getQualifier(), this.getClientConfig());
}
this.getClientElementsInitializers().forEach(ClientElementsInitializer::registerClient);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public interface MModdingModInitializer extends ModInitializer {
@MustBeInvokedByOverriders
default void onInitialize(ModContainer mod) {
MModdingLib.MMODDING_MODS.add(MModdingModContainer.from(mod));
this.getElementsInitializers().forEach(ElementsInitializer::register);
if (this.getConfig() != null) {
this.getConfig().initializeConfig();
MModdingLib.CONFIGS.put(this.getConfig().getQualifier(), this.getConfig());
if (MinecraftQuiltLoader.getEnvironmentType() == EnvType.CLIENT) {
MModdingLibClient.CLIENT_CONFIGS.put(this.getConfig().getQualifier(), TemporaryConfig.fromConfig(this.getConfig()));
}
}
this.getElementsInitializers().forEach(ElementsInitializer::register);
}
}

0 comments on commit a67d6e3

Please sign in to comment.