From b8e8cf55c0da0e80a0d96797c8c5975ca9ceb9e5 Mon Sep 17 00:00:00 2001 From: Waiting Idly <25394029+WaitingIdly@users.noreply.github.com> Date: Sun, 29 Sep 2024 02:53:38 -0700 Subject: [PATCH] add config option for checking java version resolves #63 --- src/main/java/dev/redstudio/valkyrie/Valkyrie.java | 3 ++- .../java/dev/redstudio/valkyrie/config/ValkyrieConfig.java | 3 +++ src/main/resources/assets/valkyrie/lang/en_us.lang | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/redstudio/valkyrie/Valkyrie.java b/src/main/java/dev/redstudio/valkyrie/Valkyrie.java index 6c11b78..78109a1 100644 --- a/src/main/java/dev/redstudio/valkyrie/Valkyrie.java +++ b/src/main/java/dev/redstudio/valkyrie/Valkyrie.java @@ -48,7 +48,8 @@ public final class Valkyrie { public static void preInit(FMLPreInitializationEvent preInitializationEvent) { snoozerFile = new File(preInitializationEvent.getModConfigurationDirectory() + "/" + VERSION + " Snoozer.txt"); - new Thread(JvmCheckUtil::checkJavaVersion).start(); + if (ValkyrieConfig.general.javaVersionCheck) + new Thread(JvmCheckUtil::checkJavaVersion).start(); } @Mod.EventHandler diff --git a/src/main/java/dev/redstudio/valkyrie/config/ValkyrieConfig.java b/src/main/java/dev/redstudio/valkyrie/config/ValkyrieConfig.java index a5e4ac0..2de7059 100644 --- a/src/main/java/dev/redstudio/valkyrie/config/ValkyrieConfig.java +++ b/src/main/java/dev/redstudio/valkyrie/config/ValkyrieConfig.java @@ -28,6 +28,9 @@ public class ValkyrieConfig { public static class GeneralConfig { + @Config.RequiresMcRestart + public boolean javaVersionCheck = true; + @Config.RequiresMcRestart public boolean highPrecisionDepthBuffer = false; public boolean customIcons = false; diff --git a/src/main/resources/assets/valkyrie/lang/en_us.lang b/src/main/resources/assets/valkyrie/lang/en_us.lang index a733a83..50d2111 100644 --- a/src/main/resources/assets/valkyrie/lang/en_us.lang +++ b/src/main/resources/assets/valkyrie/lang/en_us.lang @@ -24,6 +24,8 @@ jvmCheck.ignore=Ignore valkyrie.general.general=General valkyrie.general.general.tooltip=General configuration +valkyrie.general.general.javaversioncheck=Disable Outdated Java Version Check +valkyrie.general.general.javaversioncheck.tooltip=Enable or disable the popup when using an outdated Java version. valkyrie.general.general.highprecisiondepthbuffer=High Precision Depth Buffer valkyrie.general.general.highprecisiondepthbuffer.tooltip=Whether or not to use high precision depth buffer, this doesn't seem to be important or change much, but might be useful in the future. valkyrie.general.general.windowtitle=Window Title