Skip to content

Commit 0aa6cf1

Browse files
committed
Removed Hypixel Mod API dependency and the non-working dungeon detector.
1 parent ec129cd commit 0aa6cf1

File tree

5 files changed

+8
-32
lines changed

5 files changed

+8
-32
lines changed

build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ dependencies {
4444
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}")
4545
modImplementation "io.wispforest:owo-lib:${project.owo_version}"
4646

47-
modImplementation include ('net.hypixel:mod-api:1.0.1')
48-
4947
implementation 'com.google.code.gson:gson:2.10.1'
5048
}
5149

src/main/java/com/github/kd_gaming1/scaleme/client/ScalemeClient.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@
88
import eu.midnightdust.lib.config.MidnightConfig;
99
import net.fabricmc.api.ClientModInitializer;
1010
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
11-
import net.minecraft.client.option.KeyBinding;
1211

1312
public class ScalemeClient implements ClientModInitializer {
1413

15-
private static KeyBinding openConfigKey;
16-
private static KeyBinding openPresetsKey;
17-
1814
@Override
1915
public void onInitializeClient() {
2016
MidnightConfig.init(Scaleme.MOD_ID, ScaleMeConfig.class);

src/main/java/com/github/kd_gaming1/scaleme/client/util/HypixelDetector.java

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88

99
public class HypixelDetector {
1010

11-
public static String currentMode = null;
12-
public static String currentMap = null;
13-
public static String currentServerName = null;
14-
public static String serverType = null;
15-
11+
/**
12+
* Checks if the player is in a safe game mode on Hypixel.
13+
* Safe modes are defined as not being in competitive modes like SkyBlock, Lobby, Limbo, Housing, or Prototype.
14+
*
15+
* @return true if in a safe game mode, false otherwise.
16+
*/
1617
public static boolean isSafeGameMode() {
1718
MinecraftClient client = MinecraftClient.getInstance();
1819

@@ -40,24 +41,6 @@ public static boolean isSafeGameMode() {
4041
!title.startsWith("PROTOTYPE");
4142
}
4243

43-
/**
44-
* Checks if the player is in a Hypixel dungeon or catacombs.
45-
* This method uses the current mode, map, and server name to determine if the player is in dungeons.
46-
*
47-
* @return true if the player is in dungeons, false otherwise.
48-
*/
49-
public static boolean isInDungeons() {
50-
if (!"SKYBLOCK".equalsIgnoreCase(serverType)) return true;
51-
52-
String mode = currentMode != null ? currentMode.toLowerCase() : "";
53-
String map = currentMap != null ? currentMap.toLowerCase() : "";
54-
String server = currentServerName != null ? currentServerName.toLowerCase() : "";
55-
56-
return !mode.contains("dungeon") && !mode.contains("catacombs")
57-
&& !map.contains("dungeon") && !map.contains("catacombs") && !map.contains("floor")
58-
&& !server.contains("dungeon") && !server.contains("catacombs");
59-
}
60-
6144
private static String stripColors(String text) {
6245
// Remove Minecraft color codes (§ followed by any character)
6346
return text.replaceAll("§.", "");

src/main/java/com/github/kd_gaming1/scaleme/client/util/ScaleManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ public static float getCurrentScale(UUID playerUUID) {
3434
/** Returns NPC scale with safety check including dungeons detection. */
3535
public static float getNpcScale() {
3636
// Only apply scaling when it's safe (not in competitive modes or dungeons)
37-
if (HypixelDetector.isSafeGameMode() && HypixelDetector.isInDungeons()) return 1.0f;
37+
if (HypixelDetector.isSafeGameMode()) return 1.0f;
3838
return ScaleMeConfig.npcPlayerScale;
3939
}
4040

4141
/** Returns Villager NPC scale with safety check including dungeons detection. */
4242
public static float getVillagerNpcScale() {
4343
// Only apply scaling when it's safe (not in competitive modes or dungeons)
44-
if (HypixelDetector.isSafeGameMode() && HypixelDetector.isInDungeons()) return 1.0f;
44+
if (HypixelDetector.isSafeGameMode()) return 1.0f;
4545
return ScaleMeConfig.villagerNpcScale;
4646
}
4747
}

src/main/java/com/github/kd_gaming1/scaleme/config/ScaleMeConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ public class ScaleMeConfig extends MidnightConfig {
66
public static final String SCALING = "scaling";
77
public static final String PLAYERS = "players";
88
public static final String VIEW = "view";
9-
public static final String HYPIXEL_SAFETY = "hypixel_safety";
109

1110
// Own Player Scaling
1211
@Comment(category = SCALING, name = "Adjust the visual size of your own player model")

0 commit comments

Comments
 (0)