fix 1.21 neoforge

This commit is contained in:
ShirosakiMio 2024-08-06 13:14:32 +08:00
parent 456e0b6222
commit aaf783ca88
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ public final class NeoForgeOfficialVersionList extends VersionList<NeoForgeRemot
}
for (String version : results[1].versions) {
String mcVersion = "1." + version.substring(0, version.indexOf('.', version.indexOf('.') + 1));
int si1 = version.indexOf('.'), si2 = version.indexOf('.', version.indexOf('.') + 1);
String mcVersion = "1." + version.substring(0, Integer.parseInt(version.substring(si1 + 1, si2)) == 0 ? si1 : si2);
versions.put(mcVersion, new NeoForgeRemoteVersion(
mcVersion, version,
Lang.immutableListOf(