From 8bbbf63a72ce1633d2410ce9b609a972a54d42ba Mon Sep 17 00:00:00 2001 From: ev chang Date: Tue, 20 Aug 2024 03:09:00 +0700 Subject: [PATCH 1/2] Update LocrawUtil.java --- .../java/cc/polyfrost/oneconfig/utils/hypixel/LocrawUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/hypixel/LocrawUtil.java b/src/main/java/cc/polyfrost/oneconfig/utils/hypixel/LocrawUtil.java index 12c298364..3bf60d1c5 100644 --- a/src/main/java/cc/polyfrost/oneconfig/utils/hypixel/LocrawUtil.java +++ b/src/main/java/cc/polyfrost/oneconfig/utils/hypixel/LocrawUtil.java @@ -83,7 +83,7 @@ private void onTick(TickEvent event) { } this.tick++; - if (this.tick == 40 || this.tick % 520 == 0) { + if (this.tick == 40 || this.tick % 1300 == 0) { sendLocraw(false); } } From 6a27eeda3deec492e1b45e6d78dce0fbeaa0b113 Mon Sep 17 00:00:00 2001 From: ev chang Date: Wed, 21 Aug 2024 23:01:17 +0700 Subject: [PATCH 2/2] Add auto update toggle --- .../polyfrost/oneconfig/internal/config/Preferences.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java index 4dbace89f..b07b54eac 100644 --- a/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java +++ b/src/main/java/cc/polyfrost/oneconfig/internal/config/Preferences.java @@ -185,6 +185,11 @@ public class Preferences extends InternalConfig { max = 100f ) public static float trackerResponseDuration = 60; + + @Switch( + name = "Auto Update" + ) + public static boolean autoUpdate = true; @Dropdown( name = "Release Channel", @@ -219,6 +224,10 @@ public Preferences() { initialize(); addListener("enableBlur", () -> BlurHandler.INSTANCE.reloadBlur(Platform.getGuiPlatform().getCurrentScreen())); registerKeyBind(oneConfigKeyBind, () -> new TickDelay(() -> Platform.getGuiPlatform().setCurrentScreen(OneConfigGui.create()), 1)); + addListener("autoUpdate", () -> { + OneConfigConfig.autoUpdate = autoUpdate; + OneConfigConfig.getInstance().save(); + }); addListener("updateChannel", () -> { OneConfigConfig.updateChannel = updateChannel; OneConfigConfig.getInstance().save();