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 | 18 |
1 files changed, 4 insertions, 14 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 7ecfe98..4f73198 100644 --- a/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java +++ b/versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java @@ -17,12 +17,15 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.io.File; -import java.util.ServiceLoader; /** * The main class of OneConfig. */ +//#if MC<=11202 @net.minecraftforge.fml.common.Mod(modid = "@ID@", name = "@NAME@", version = "@VER@") +//#else +//$$ @net.minecraftforge.fml.common.Mod("@ID@") +//#endif public class OneConfig { public OneConfig() { @@ -33,7 +36,6 @@ public class OneConfig { public static final Logger LOGGER = LogManager.getLogger("@NAME@"); private static boolean preLaunched = false; private static boolean initialized = false; - private static boolean isObfuscated = true; /** * Called before mods are loaded. @@ -41,12 +43,6 @@ public class OneConfig { */ public static void preLaunch() { if (preLaunched) return; - try { - Class.forName("net.minecraft.world.World"); - LOGGER.warn("OneConfig is NOT obfuscated!"); - isObfuscated = false; - } catch (Exception ignored) { - } oneConfigDir.mkdirs(); new File(oneConfigDir, "profiles").mkdirs(); if (OneConfigConfig.getInstance() == null) { @@ -80,12 +76,6 @@ public class OneConfig { initialized = true; } - /** Returns weather this is an obfuscated environment, using a check for obfuscated name of net.minecraft.world.World.class. - * @return true if this is an obfuscated environment, which is normal for Minecraft or false if not. */ - public static boolean isObfuscated() { - return isObfuscated; - } - @Subscribe private void onShutdown(ShutdownEvent event) { ConfigCore.saveAll(); |