mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 11:55:52 -04:00
Only maintain game version json with launchwrapper installed.
Forge modlauncher is not supported right now.
This commit is contained in:
parent
38725abc48
commit
bcaa019551
@ -40,6 +40,16 @@ public class MaintainTask extends TaskResult<Version> {
|
||||
}
|
||||
|
||||
public static Version maintain(Version version) {
|
||||
if (version.getMainClass().contains("launchwrapper")) {
|
||||
return maintainGameWithLaunchWrapper(version);
|
||||
} else {
|
||||
// Vanilla Minecraft does not need maintain
|
||||
// Forge 1.13.2 support not implemented.
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
private static Version maintainGameWithLaunchWrapper(Version version) {
|
||||
LibraryAnalyzer libraryAnalyzer = LibraryAnalyzer.analyze(version);
|
||||
VersionLibraryBuilder builder = new VersionLibraryBuilder(version);
|
||||
|
||||
|
@ -45,6 +45,7 @@ public final class ValidationTypeAdapterFactory implements TypeAdapterFactory {
|
||||
((Validation) t).validate();
|
||||
} catch (TolerableValidationException e) {
|
||||
delegate.write(writer, null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user