修复无法正确安装 MultiMC 整合包的问题 (#6584)

This commit is contained in:
Burning_TNT 2026-08-04 19:33:20 +08:00 committed by GitHub
parent af71c71663
commit af4d9feea5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -95,7 +95,7 @@ public class MaintainTask extends Task<GameInstanceManifest> {
if (!manifest.isResolvedPreservingPatches())
throw new IllegalArgumentException("MaintainTask requires independent game version");
GameInstanceManifest newVersion = maintain(repository, manifest.resolve(repository));
return newVersion.withPatches(manifest.getPatches());
return newVersion.patches() == null ? newVersion : newVersion.withPatches(manifest.getPatches());
}
private static GameInstanceManifest maintainGameWithLaunchWrapper(GameRepository repository, GameInstanceManifest manifest, boolean reorderTweakClass) {