diff --git a/loader-fabric/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesFabric.java b/loader-fabric/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesFabric.java index f0198b7729..8d71e2af72 100644 --- a/loader-fabric/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesFabric.java +++ b/loader-fabric/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesFabric.java @@ -9,7 +9,7 @@ */ public class ConfigurableTypesFabric { - static { + public static void load() { ConfigurableTypeCommon.PARTICLE.setAction(new ParticleActionFabric<>()); } diff --git a/loader-fabric/src/main/java/org/cyclops/cyclopscore/init/ModBaseFabric.java b/loader-fabric/src/main/java/org/cyclops/cyclopscore/init/ModBaseFabric.java index d56eecb760..43f1a3435f 100644 --- a/loader-fabric/src/main/java/org/cyclops/cyclopscore/init/ModBaseFabric.java +++ b/loader-fabric/src/main/java/org/cyclops/cyclopscore/init/ModBaseFabric.java @@ -7,6 +7,7 @@ import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; import org.cyclops.cyclopscore.config.ConfigHandlerFabric; +import org.cyclops.cyclopscore.config.ConfigurableTypesFabric; import org.cyclops.cyclopscore.helper.IModHelpersFabric; import org.cyclops.cyclopscore.helper.ModBaseCommon; import org.cyclops.cyclopscore.helper.ModHelpersFabric; @@ -25,6 +26,10 @@ */ public abstract class ModBaseFabric> extends ModBaseCommon implements ModInitializer { + static { + ConfigurableTypesFabric.load(); + } + private boolean loaded = false; private final ICommonProxyCommon proxy; private final ConfigHandlerFabric configHandler; diff --git a/loader-forge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesForge.java b/loader-forge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesForge.java index 83e8c8dc6b..f6b56e141d 100644 --- a/loader-forge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesForge.java +++ b/loader-forge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesForge.java @@ -16,7 +16,7 @@ */ public class ConfigurableTypesForge { - static { + public static void load() { ConfigurableTypeCommon.BLOCK.setAction(new BlockActionForge<>()); ConfigurableTypeCommon.ITEM.setAction(new ItemActionForge<>()); ConfigurableTypeCommon.GUI.setAction(new GuiActionForge<>()); diff --git a/loader-forge/src/main/java/org/cyclops/cyclopscore/init/ModBaseForge.java b/loader-forge/src/main/java/org/cyclops/cyclopscore/init/ModBaseForge.java index 05e680cf2e..efb31e6fbb 100644 --- a/loader-forge/src/main/java/org/cyclops/cyclopscore/init/ModBaseForge.java +++ b/loader-forge/src/main/java/org/cyclops/cyclopscore/init/ModBaseForge.java @@ -16,6 +16,7 @@ import org.apache.logging.log4j.Level; import org.cyclops.cyclopscore.config.ConfigHandlerCommon; import org.cyclops.cyclopscore.config.ConfigHandlerForge; +import org.cyclops.cyclopscore.config.ConfigurableTypesForge; import org.cyclops.cyclopscore.helper.IModHelpersForge; import org.cyclops.cyclopscore.helper.ModBaseCommon; import org.cyclops.cyclopscore.helper.ModHelpersForge; @@ -32,6 +33,10 @@ */ public abstract class ModBaseForge> extends ModBaseCommon { + static { + ConfigurableTypesForge.load(); + } + private final ICommonProxyCommon proxy; private final ConfigHandlerCommon configHandler; private final IEventBus modEventBus; diff --git a/loader-neoforge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesNeoForge.java b/loader-neoforge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesNeoForge.java index 8e9faa9eee..844e249252 100644 --- a/loader-neoforge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesNeoForge.java +++ b/loader-neoforge/src/main/java/org/cyclops/cyclopscore/config/ConfigurableTypesNeoForge.java @@ -8,7 +8,7 @@ */ public class ConfigurableTypesNeoForge { - static { + public static void load() { ConfigurableTypeCommon.GUI.setAction(new GuiActionNeoForge<>()); ConfigurableTypeCommon.PARTICLE.setAction(new ParticleActionNeoForge<>()); } diff --git a/loader-neoforge/src/main/java/org/cyclops/cyclopscore/init/ModBase.java b/loader-neoforge/src/main/java/org/cyclops/cyclopscore/init/ModBase.java index 4f3d0f54a9..3694cedd23 100644 --- a/loader-neoforge/src/main/java/org/cyclops/cyclopscore/init/ModBase.java +++ b/loader-neoforge/src/main/java/org/cyclops/cyclopscore/init/ModBase.java @@ -30,6 +30,7 @@ import org.cyclops.cyclopscore.config.ConfigHandler; import org.cyclops.cyclopscore.config.ConfigHandlerCommon; import org.cyclops.cyclopscore.config.ConfigHandlerNeoForge; +import org.cyclops.cyclopscore.config.ConfigurableTypesNeoForge; import org.cyclops.cyclopscore.helper.IModHelpersNeoForge; import org.cyclops.cyclopscore.helper.LoggerHelper; import org.cyclops.cyclopscore.helper.ModBaseCommon; @@ -55,6 +56,10 @@ // TODO: rename to ModBaseNeoForge in next major public abstract class ModBase> extends ModBaseCommon { + static { + ConfigurableTypesNeoForge.load(); + } + public static final EnumReferenceKey REFKEY_TEXTURE_PATH_GUI = EnumReferenceKey.create("texture_path_gui", String.class); public static final EnumReferenceKey REFKEY_TEXTURE_PATH_MODELS = EnumReferenceKey.create("texture_path_models", String.class); public static final EnumReferenceKey REFKEY_TEXTURE_PATH_SKINS = EnumReferenceKey.create("texture_path_skins", String.class);