Skip to content

Commit f492306

Browse files
committed
Revert "bye bye skyclient"
This reverts commit 55cf145.
1 parent 9daeb9f commit f492306

File tree

10 files changed

+12
-410
lines changed

10 files changed

+12
-410
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod_name = OneConfig
22
mod_id = oneconfig
33
mod_major_version = 0.2.2-alpha
4-
mod_minor_version = 224
4+
mod_minor_version = 223
55

66
polyfrost.defaults.loom=3
77

src/main/java/cc/polyfrost/oneconfig/utils/Notifications.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import cc.polyfrost.oneconfig.renderer.NanoVGHelper;
4343
import cc.polyfrost.oneconfig.renderer.asset.Icon;
4444
import cc.polyfrost.oneconfig.utils.gui.GuiUtils;
45+
import org.apache.commons.lang3.StringUtils;
4546
import org.jetbrains.annotations.Nullable;
4647

4748
import java.io.File;
@@ -253,6 +254,8 @@ else if (desiredPosition != entry.getValue().getEnd())
253254

254255
private Animation dummyAnimation;
255256
private static final Icon DEFAULT_ICON = new Icon(SVGs.ONECONFIG_HEAD_DARK);
257+
private static final File crashPatchSkyClientFile = new File("./OneConfig/CrashPatch/SKYCLIENT");
258+
private static final File oldCrashPatchSkyClientFile = new File("./W-OVERFLOW/CrashPatch/SKYCLIENT");
256259

257260
@Subscribe
258261
private void onTickEvent(TickEvent event) {
@@ -261,7 +264,8 @@ private void onTickEvent(TickEvent event) {
261264
Preferences.firstLaunch = false;
262265
Preferences.getInstance().save();
263266
dummyAnimation = new EaseInOutQuad(4000, 0, 1, false);
264-
String message = "Press '" + Preferences.oneConfigKeyBind.getDisplay() + "' to open OneConfig, the next-gen config library for Minecraft.";
267+
boolean isSkyClient = isSkyClient();
268+
String message = isSkyClient ? "SkyClient now includes OneConfig, the next-gen config library for Minecraft. You can now simply press '" + Preferences.oneConfigKeyBind.getDisplay() + "' to configure all your mods!" : "Press '" + Preferences.oneConfigKeyBind.getDisplay() + "' to open OneConfig, the next-gen config library for Minecraft.";
265269
send("Welcome to OneConfig!", message, DEFAULT_ICON, -1f, () -> {
266270
if (Platform.getGuiPlatform().getCurrentScreen() instanceof OneConfigGui || Preferences.oneconfigOpened) {
267271
Preferences.oneconfigOpened = true;
@@ -274,4 +278,10 @@ private void onTickEvent(TickEvent event) {
274278
}
275279
}
276280
}
281+
282+
private boolean isSkyClient() {
283+
if (crashPatchSkyClientFile.exists()) return true;
284+
if (oldCrashPatchSkyClientFile.exists()) return true;
285+
return Platform.getLoaderPlatform().getLoadedMods().stream().anyMatch(mod -> mod != null && StringUtils.contains(mod.id, "skyclient") || StringUtils.contains(mod.id, "skyblockclient") || StringUtils.equals(mod.id, "scc"));
286+
}
277287
}

versions/src/main/java/cc/polyfrost/oneconfig/internal/OneConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import cc.polyfrost.oneconfig.internal.config.core.ConfigCore;
3737
import cc.polyfrost.oneconfig.internal.config.core.KeyBindHandler;
3838
import cc.polyfrost.oneconfig.internal.gui.BlurHandler;
39-
import cc.polyfrost.oneconfig.internal.hacks.ByeSkyClientHack;
4039
import cc.polyfrost.oneconfig.internal.hud.HudCore;
4140
import cc.polyfrost.oneconfig.libs.universal.ChatColor;
4241
import cc.polyfrost.oneconfig.libs.universal.UChat;
@@ -173,7 +172,6 @@ public void init() {
173172
HypixelUtils.INSTANCE.initialize();
174173
EventManager.INSTANCE.register(KeyBindHandler.INSTANCE);
175174
ConfigCore.sortMods();
176-
ByeSkyClientHack.INSTANCE.initialize();
177175

178176
initialized = true;
179177
}

versions/src/main/java/cc/polyfrost/oneconfig/internal/hacks/ByeSkyClientHack.java

Lines changed: 0 additions & 316 deletions
This file was deleted.

0 commit comments

Comments
 (0)