mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 03:46:18 -04:00
修复通过自动安装更新游戏时的崩溃 (#1662)
* fix game upgrade * fix #1459: Invalidate the version number cache before saving the version close #1566
This commit is contained in:
parent
d9bdc2b1f7
commit
c21671e86b
@ -91,9 +91,11 @@ class AdditionalInstallersPage extends InstallersPage {
|
|||||||
String optiFine = analyzer.getVersion(OPTIFINE).orElse(null);
|
String optiFine = analyzer.getVersion(OPTIFINE).orElse(null);
|
||||||
String fabric = analyzer.getVersion(FABRIC).orElse(null);
|
String fabric = analyzer.getVersion(FABRIC).orElse(null);
|
||||||
String fabricApi = analyzer.getVersion(FABRIC_API).orElse(null);
|
String fabricApi = analyzer.getVersion(FABRIC_API).orElse(null);
|
||||||
|
String quilt = analyzer.getVersion(QUILT).orElse(null);
|
||||||
|
String quiltApi = analyzer.getVersion(QUILT_API).orElse(null);
|
||||||
|
|
||||||
InstallerItem[] libraries = group.getLibraries();
|
InstallerItem[] libraries = group.getLibraries();
|
||||||
String[] versions = new String[]{game, forge, liteLoader, optiFine, fabric, fabricApi};
|
String[] versions = new String[]{game, forge, liteLoader, optiFine, fabric, fabricApi, quilt, quiltApi};
|
||||||
|
|
||||||
String currentGameVersion = Lang.nonNull(getVersion("game"), game);
|
String currentGameVersion = Lang.nonNull(getVersion("game"), game);
|
||||||
|
|
||||||
|
@ -488,6 +488,7 @@ public class DefaultGameRepository implements GameRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Task<Version> saveAsync(Version version) {
|
public Task<Version> saveAsync(Version version) {
|
||||||
|
this.gameVersions.remove(getVersionJar(version));
|
||||||
if (version.isResolvedPreservingPatches()) {
|
if (version.isResolvedPreservingPatches()) {
|
||||||
return new VersionJsonSaveTask(this, MaintainTask.maintainPreservingPatches(this, version));
|
return new VersionJsonSaveTask(this, MaintainTask.maintainPreservingPatches(this, version));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user