Skip to content

Commit 0070e0f

Browse files
committed
Fix for endlessIDs compat.
Apparently I just messed up a single string comparison... ugh.
1 parent 55076dc commit 0070e0f

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ modrinthProjectId =
142142
# type can be one of [project, version],
143143
# and the name is the Modrinth project or version slug/id of the other mod.
144144
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
145-
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
145+
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
146146
modrinthRelations =
147147

148148
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ pluginManagement {
1717
}
1818

1919
plugins {
20-
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.38")
20+
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.44")
2121
}

src/main/java/com/gamma/spool/core/SpoolCompat.java

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void earlyInitialization() {
3333

3434
SpoolLogger.compatInfo("Loading early compat...");
3535

36-
checkIsModLoadedFQCN("endlessIDs", "com.falsepattern.endlessids.asm.EndlessIDsCore");
36+
checkIsModLoadedFQCN("endlessids", "com.falsepattern.endlessids.asm.EndlessIDsCore");
3737

3838
// Order matters here; NTM Space should be prioritized due to it being an FQCN-based compat.
3939
checkIsModLoadedFQCN("hbm", SpecialModVersions.NTM_SPACE, "com.hbm.util.AstronomyUtil");
@@ -45,6 +45,8 @@ public static void earlyInitialization() {
4545
for (Mod mod : compatSet) SpoolLogger.compatInfo(" - " + mod.toString());
4646
}
4747

48+
logChange(String.format("COMPAT - Early compat loaded: %s\n", compatSet));
49+
4850
isEarlyCompatReady = true;
4951
}
5052

@@ -72,52 +74,53 @@ public static void checkLoadedMods() {
7274
for (Mod mod : compatSet) SpoolLogger.compatInfo(" - " + mod.toString());
7375
}
7476

77+
logChange(String.format("COMPAT - Standard compat loaded: %s\n", compatSet));
78+
7579
isCompatReady = true;
7680
}
7781

7882
private static void checkIsModLoadedFQCN(String modID, String fqcn) {
7983
try {
80-
SpoolLogger.compatInfo("Checking for mod {} (presence of fqcn {}).", modID, fqcn);
84+
SpoolLogger.compatInfo("Checking for mod {} (presence of fqcn {}).", modID.toLowerCase(), fqcn);
8185
// Disallow initialization of the class.
8286
Class.forName(
8387
fqcn,
8488
false,
8589
Thread.currentThread()
8690
.getContextClassLoader());
87-
compatSet.add(new Mod(modID));
91+
compatSet.add(new Mod(modID.toLowerCase()));
8892
} catch (Throwable ignored) {}
8993
}
9094

9195
private static void checkIsModLoadedFQCN(String modID, SpecialModVersions ver, String fqcn) {
9296
try {
93-
SpoolLogger.compatInfo("Checking for mod {} ({}) (presence of fqcn {}).", modID, ver.name(), fqcn);
97+
SpoolLogger
98+
.compatInfo("Checking for mod {} ({}) (presence of fqcn {}).", modID.toLowerCase(), ver.name(), fqcn);
9499
// Disallow initialization of the class.
95100
Class.forName(
96101
fqcn,
97102
false,
98103
Thread.currentThread()
99104
.getContextClassLoader());
100-
compatSet.add(new Mod(modID, ver));
105+
compatSet.add(new Mod(modID.toLowerCase(), ver));
101106
} catch (Throwable ignored) {}
102107
}
103108

104109
private static void checkIsModLoaded(String modID) {
105-
if (Loader.isModLoaded(modID)) compatSet.add(new Mod(modID));
110+
if (Loader.isModLoaded(modID.toLowerCase())) compatSet.add(new Mod(modID.toLowerCase()));
106111
}
107112

108113
private static void checkIsModLoaded(String modID, SpecialModVersions ver) {
109-
if (Loader.isModLoaded(modID)) compatSet.add(new Mod(modID, ver));
114+
if (Loader.isModLoaded(modID.toLowerCase())) compatSet.add(new Mod(modID.toLowerCase(), ver));
110115
}
111116

112117
public static boolean isModLoaded(String modID) {
113-
for (Mod mod : compatSet) if (mod.modID.equals(modID) && mod.ver == null) return true;
114-
118+
for (Mod mod : compatSet) if (mod.modID.equals(modID.toLowerCase()) && mod.ver == null) return true;
115119
return false;
116120
}
117121

118122
public static boolean isModLoaded(String modID, SpecialModVersions ver) {
119-
for (Mod mod : compatSet) if (mod.modID.equals(modID) && mod.ver.equals(ver)) return true;
120-
123+
for (Mod mod : compatSet) if (mod.modID.equals(modID.toLowerCase()) && mod.ver.equals(ver)) return true;
121124
return false;
122125
}
123126

0 commit comments

Comments
 (0)