Skip to content

Commit

Permalink
FIXED: more exotic versions now work with the new version graph
Browse files Browse the repository at this point in the history
  • Loading branch information
WinPlay02 committed Sep 3, 2023
1 parent c78692c commit 1f1613c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
21 changes: 21 additions & 0 deletions semver-cache.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"1.14.4-pre5": "1.14.4-rc.5",
"1.14.4-pre6": "1.14.4-rc.6",
"1.14.4-pre7": "1.14.4-rc.7",
"1.14_combat-0": "1.14.5-combat.2",
"1.14_combat-212796": "1.14.3-rc.4.combat.1",
"1.14_combat-3": "1.14.5-combat.3",
"1.15": "1.15",
"1.15-pre1": "1.15-rc.1",
"1.15-pre2": "1.15-rc.2",
Expand All @@ -80,6 +83,8 @@
"1.15.2": "1.15.2",
"1.15.2-pre1": "1.15.2-rc.1",
"1.15.2-pre2": "1.15.2-rc.2",
"1.15_combat-1": "1.15-rc.3.combat.4",
"1.15_combat-6": "1.15.2-rc.2.combat.5",
"1.16": "1.16",
"1.16-pre1": "1.16-rc.1",
"1.16-pre2": "1.16-rc.2",
Expand All @@ -105,6 +110,13 @@
"1.16.4-rc1": "1.16.4-rc.1",
"1.16.5": "1.16.5",
"1.16.5-rc1": "1.16.5-rc.1",
"1.16_combat-0": "1.16.2-beta.3.combat.6",
"1.16_combat-1": "1.16.3-combat.7",
"1.16_combat-2": "1.16.3-combat.7.b",
"1.16_combat-3": "1.16.3-combat.7.c",
"1.16_combat-4": "1.16.3-combat.8",
"1.16_combat-5": "1.16.3-combat.8.b",
"1.16_combat-6": "1.16.3-combat.8.c",
"1.17": "1.17",
"1.17-pre1": "1.17-beta.1",
"1.17-pre2": "1.17-beta.2",
Expand Down Expand Up @@ -142,6 +154,13 @@
"1.18.2-pre2": "1.18.2-beta.2",
"1.18.2-pre3": "1.18.2-beta.3",
"1.18.2-rc1": "1.18.2-rc.1",
"1.18_experimental-snapshot-1": "1.18-alpha.0.0.Experimental.1",
"1.18_experimental-snapshot-2": "1.18-alpha.0.0.Experimental.2",
"1.18_experimental-snapshot-3": "1.18-alpha.0.0.Experimental.3",
"1.18_experimental-snapshot-4": "1.18-alpha.0.0.Experimental.4",
"1.18_experimental-snapshot-5": "1.18-alpha.0.0.Experimental.5",
"1.18_experimental-snapshot-6": "1.18-alpha.0.0.Experimental.6",
"1.18_experimental-snapshot-7": "1.18-alpha.0.0.Experimental.7",
"1.19": "1.19",
"1.19-pre1": "1.19-beta.1",
"1.19-pre2": "1.19-beta.2",
Expand Down Expand Up @@ -178,6 +197,7 @@
"1.19.4-rc1": "1.19.4-rc.1",
"1.19.4-rc2": "1.19.4-rc.2",
"1.19.4-rc3": "1.19.4-rc.3",
"1.19_deep_dark_experimental_snapshot-1": "1.19-alpha.0.0.Experimental.1",
"1.2.1": "1.2.1",
"1.2.2": "1.2.2",
"1.2.3": "1.2.3",
Expand Down Expand Up @@ -630,6 +650,7 @@
"23w12a": "1.20-alpha.23.12.a",
"23w13a": "1.20-alpha.23.13.a",
"23w13a_or_b": "1.20-alpha.23.13.ab",
"23w13a_or_b_original": "1.20-alpha.23.13.ab.original",
"23w14a": "1.20-alpha.23.14.a",
"23w16a": "1.20-alpha.23.16.a",
"23w17a": "1.20-alpha.23.17.a",
Expand Down
17 changes: 16 additions & 1 deletion src/main/groovy/com/github/winplay02/MinecraftVersionGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static void lookupLoaderVersion(McVersion mcVersion) {
if (semverCache.containsKey(mcVersion.version)) {
try {
SemanticVersion.parse(semverCache.get(mcVersion.version));
mcVersion.loaderVersion = mcVersion.version;
mcVersion.loaderVersion = semverCache.get(mcVersion.version);
return;
} catch (VersionParsingException ignored) {
}
Expand All @@ -169,6 +169,9 @@ public static void lookupLoaderVersion(McVersion mcVersion) {
}
}
mcVersion.loaderVersion = fixupSemver(Objects.equals(x.getNormalized(), "client") ? mcVersion.version : x.getNormalized());
if (mcVersion.version.equalsIgnoreCase("23w13a_or_b_original")) { // support extra original
mcVersion.loaderVersion = "1.20-alpha.23.13.ab.original";
}
MiscHelper.println("Semver mapped for: %s as %s", x.getRaw(), mcVersion.loaderVersion);
}
}
Expand All @@ -177,6 +180,15 @@ public static void lookupLoaderVersion(McVersion mcVersion) {
public static String findPreviousBaseNodeVersionNameForNonLinearVersionString(McVersion mcVersion) {
switch (mcVersion.loaderVersion) {
// Combat
case "1.14.3-rc.4.combat.1" -> {
return "1.14.3-rc.4";
}
case "1.14.5-combat.2" -> {
return "1.14.4";
}
case "1.14.5-combat.3" -> {
return "1.14.5-combat.2";
}
case "1.15-rc.3.combat.4" -> {
return "1.15-rc.3";
}
Expand Down Expand Up @@ -223,6 +235,9 @@ public static String findPreviousBaseNodeVersionNameForNonLinearVersionString(Mc
case "1.20-alpha.23.13.ab" -> {
return "1.20-alpha.23.13.a";
}
case "1.20-alpha.23.13.ab.original" -> {
return "1.20-alpha.23.13.a";
}
default -> {
return null;
}
Expand Down

0 comments on commit 1f1613c

Please sign in to comment.