diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-01-25 17:23:51 -0800 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2022-01-25 17:23:51 -0800 |
commit | efe2214f497848e747192b7964af68bb7c94fd33 (patch) | |
tree | c126bce14de003e8799220e1a0270c5537a41c48 /src/main/java/com/anthonyhilyard/iceberg/config | |
parent | 0cd83156930cf320578e09fafa17069bedd8230f (diff) | |
download | Iceberg-efe2214f497848e747192b7964af68bb7c94fd33.tar.gz Iceberg-efe2214f497848e747192b7964af68bb7c94fd33.tar.bz2 Iceberg-efe2214f497848e747192b7964af68bb7c94fd33.zip |
Locked configmenusforge mixins to current version. Fixed IcebergConfig
events not firing.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/config')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/config/IcebergConfig.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/config/IcebergConfig.java b/src/main/java/com/anthonyhilyard/iceberg/config/IcebergConfig.java index e27e08d..cc48c2c 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/config/IcebergConfig.java +++ b/src/main/java/com/anthonyhilyard/iceberg/config/IcebergConfig.java @@ -9,12 +9,10 @@ import org.apache.commons.lang3.tuple.Pair; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.config.ModConfigEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -@EventBusSubscriber(modid = Loader.MODID, bus = Bus.MOD) public abstract class IcebergConfig<T extends IcebergConfig<?>> { private static IcebergConfigSpec SPEC = null; @@ -32,7 +30,7 @@ public abstract class IcebergConfig<T extends IcebergConfig<?>> } @SubscribeEvent - private static void onLoadEvent(ModConfigEvent.Loading event) + protected final static void onLoadEvent(ModConfigEvent.Loading event) { if (modId != null && INSTANCE != null && event.getConfig().getModId().contentEquals(modId)) { @@ -41,7 +39,7 @@ public abstract class IcebergConfig<T extends IcebergConfig<?>> } @SubscribeEvent - private static void onReloadEvent(ModConfigEvent.Reloading event) + protected final static void onReloadEvent(ModConfigEvent.Reloading event) { if (modId != null && INSTANCE != null && event.getConfig().getModId().contentEquals(modId)) { @@ -58,6 +56,8 @@ public abstract class IcebergConfig<T extends IcebergConfig<?>> IcebergConfig.modId = modId; + FMLJavaModLoadingContext.get().getModEventBus().register(superClass); + Pair<IcebergConfig<?>, IcebergConfigSpec> specPair = new IcebergConfigSpec.Builder().finish((builder) -> { IcebergConfig<?> result = null; |