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.dev/0.11
parent
e2b4bc8985
commit
2994c2d488
|
@ -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,11 +298,10 @@ public class MinecraftProviderImpl extends DependencyProvider implements Minecra
|
|||
final String id = split[1];
|
||||
final String path = split[2];
|
||||
|
||||
if (minecraftVersion().equals(id)) {
|
||||
// Take the first (only) version we find.
|
||||
jarPath = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Objects.requireNonNull(jarPath, "Could not find minecraft server jar for " + minecraftVersion());
|
||||
ZipEntry serverJarEntry = zipFile.getEntry("META-INF/versions/" + jarPath);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
minecraft_version=21w44a
|
||||
yarn_mappings=21w44a+build.8
|
||||
minecraft_version=1.18-pre1
|
||||
yarn_mappings=1.18-pre1+build.2
|
||||
loader_version=0.12.5
|
||||
fabric_version=0.42.1+1.18
|
||||
|
||||
|
|
Loading…
Reference in New Issue