Skip to content

Commit

Permalink
Add registerConfig method
Browse files Browse the repository at this point in the history
  • Loading branch information
dhyces committed Mar 20, 2024
1 parent 1979b07 commit a727904
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loader/src/main/java/net/neoforged/fml/ModContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.neoforged.bus.api.Event;
import net.neoforged.bus.api.EventPriority;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.config.IConfigSpec;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.IModBusEvent;
import net.neoforged.fml.loading.progress.ProgressMeter;
Expand Down Expand Up @@ -155,6 +156,10 @@ public void addConfig(final ModConfig modConfig) {
configs.put(modConfig.getType(), modConfig);
}

public void registerConfig(ModConfig.Type type, IConfigSpec<?> configSpec) {
addConfig(new ModConfig(type, configSpec, this));
}

/**
* Does this mod match the supplied mod?
*
Expand Down

0 comments on commit a727904

Please sign in to comment.