Fix #2934: 修复无法读取远古版本版本号的问题 (#2936)

* update

* update
This commit is contained in:
Glavo
2024-03-15 20:57:45 +08:00
committed by GitHub
parent 78f080b6cc
commit 8efdc536ee
2 changed files with 8 additions and 3 deletions

View File

@@ -104,8 +104,13 @@ final class GameVersion {
if (minecraft != null) {
try (InputStream is = gameJar.getInputStream(minecraft)) {
Optional<String> result = getVersionOfClassMinecraft(is);
if (result.isPresent())
if (result.isPresent()) {
String version = result.get();
if (version.startsWith("Beta ")) {
result = Optional.of("b" + version.substring("Beta ".length()));
}
return result;
}
}
}