diff options
Diffstat (limited to 'versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java')
-rw-r--r-- | versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java b/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java index 4f73198..7eb5ef9 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java @@ -24,43 +24,32 @@ import java.io.File; //#if MC<=11202 @net.minecraftforge.fml.common.Mod(modid = "@ID@", name = "@NAME@", version = "@VER@") //#else +//#if FORGE==1 //$$ @net.minecraftforge.fml.common.Mod("@ID@") //#endif +//#endif public class OneConfig { public OneConfig() { EventManager.INSTANCE.register(this); } - public static final File oneConfigDir = new File("./OneConfig"); public static final Logger LOGGER = LogManager.getLogger("@NAME@"); - private static boolean preLaunched = false; private static boolean initialized = false; /** - * Called before mods are loaded. + * Called after mods are loaded. * <p><b>SHOULD NOT BE CALLED!</b></p> */ - public static void preLaunch() { - if (preLaunched) return; - oneConfigDir.mkdirs(); - new File(oneConfigDir, "profiles").mkdirs(); + @SuppressWarnings("ResultOfMethodCallIgnored") + public static void init() { + if (initialized) return; if (OneConfigConfig.getInstance() == null) { OneConfigConfig.getInstance(); } if (Preferences.getInstance() == null) { Preferences.getInstance(); } - preLaunched = true; - } - - /** - * Called after mods are loaded. - * <p><b>SHOULD NOT BE CALLED!</b></p> - */ - @SuppressWarnings("ResultOfMethodCallIgnored") - public static void init() { - if (initialized) return; GuiUtils.getDeltaTime(); // called to make sure static initializer is called try { EventManager.INSTANCE.register(BlurHandler.INSTANCE); |