mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Fix for 1.18-pre1 server bundler.
In the bundler its called 1.18 Pre-release 1 not 1.18-pre1, so we just assume there is only ever going to be 1 version per jar.
This commit is contained in:
@@ -281,8 +281,13 @@ public class MinecraftProviderImpl extends DependencyProvider implements Minecra
|
||||
}
|
||||
|
||||
String jarPath = null;
|
||||
String[] versions = versionsList.split("\n");
|
||||
|
||||
for (String version : versionsList.split("\n")) {
|
||||
if (versions.length != 1) {
|
||||
throw new UnsupportedOperationException("Expected only 1 version in META-INF/versions.list, but got %d".formatted(versions.length));
|
||||
}
|
||||
|
||||
for (String version : versions) {
|
||||
if (version.isBlank()) continue;
|
||||
|
||||
String[] split = version.split("\t");
|
||||
@@ -293,10 +298,9 @@ public class MinecraftProviderImpl extends DependencyProvider implements Minecra
|
||||
final String id = split[1];
|
||||
final String path = split[2];
|
||||
|
||||
if (minecraftVersion().equals(id)) {
|
||||
jarPath = path;
|
||||
break;
|
||||
}
|
||||
// Take the first (only) version we find.
|
||||
jarPath = path;
|
||||
break;
|
||||
}
|
||||
|
||||
Objects.requireNonNull(jarPath, "Could not find minecraft server jar for " + minecraftVersion());
|
||||
|
||||
Reference in New Issue
Block a user