Only maintain game version json with launchwrapper installed.

Forge modlauncher is not supported right now.
This commit is contained in:
huanghongxun 2019-02-06 15:14:08 +08:00
parent 38725abc48
commit bcaa019551
2 changed files with 11 additions and 0 deletions

View File

@ -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);

View File

@ -45,6 +45,7 @@ public final class ValidationTypeAdapterFactory implements TypeAdapterFactory {
((Validation) t).validate();
} catch (TolerableValidationException e) {
delegate.write(writer, null);
return;
}
}