mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 20:37:30 -04:00
parent
c33ef5170b
commit
abda9f50e1
@ -30,6 +30,7 @@ import org.jackhuang.hmcl.task.GetTask;
|
|||||||
import org.jackhuang.hmcl.task.Task;
|
import org.jackhuang.hmcl.task.Task;
|
||||||
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
import org.jackhuang.hmcl.util.gson.JsonUtils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.jackhuang.hmcl.download.UnsupportedInstallationException.FABRIC_NOT_COMPATIBLE_WITH_FORGE;
|
import static org.jackhuang.hmcl.download.UnsupportedInstallationException.FABRIC_NOT_COMPATIBLE_WITH_FORGE;
|
||||||
@ -83,8 +84,12 @@ public final class FabricInstallTask extends Task<Version> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() throws IOException {
|
||||||
setResult(getPatch(JsonUtils.GSON.fromJson(launchMetaTask.getResult(), FabricInfo.class), remote.getGameVersion(), remote.getSelfVersion()));
|
FabricInfo fabricInfo = JsonUtils.GSON.fromJson(launchMetaTask.getResult(), FabricInfo.class);
|
||||||
|
if (fabricInfo == null)
|
||||||
|
throw new IOException("Fabric metadata is invalid");
|
||||||
|
|
||||||
|
setResult(getPatch(fabricInfo, remote.getGameVersion(), remote.getSelfVersion()));
|
||||||
|
|
||||||
dependencies.add(dependencyManager.checkLibraryCompletionAsync(getResult(), true));
|
dependencies.add(dependencyManager.checkLibraryCompletionAsync(getResult(), true));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user