MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / asyncInstall

Method asyncInstall

MCSL2Lib/ServerControllers/serverInstaller.py:348–362  ·  view source on GitHub ↗

安装Forge 若为1.17以上版本,则使用PlanB 若为1.17以下版本,则使用PlanA 若安装过程中出现错误,则抛出InstallerError

(self)

Source from the content-addressed store, hash-verified

346 return False
347
348 def asyncInstall(self):
349 """
350 安装Forge
351 若为1.17以上版本,则使用PlanB
352 若为1.17以下版本,则使用PlanA
353
354 若安装过程中出现错误,则抛出InstallerError
355 """
356 MCSL2Logger.debug(f"Forge 安装: {self.__class__.__name__}{self._mcVersion}")
357 MCSL2Logger.debug(f"Forge 安装: {self.__class__.__name__}, {self._forgeVersion}")
358 MCSL2Logger.debug(f"Forge 安装: {self.thread().currentThreadId()=}")
359 if self.cancelled:
360 self.installFinished.emit(False, "用户取消")
361 return
362 self.__asyncInstallRoutine()
363
364 def __asyncInstallRoutine(self):
365 self.__BeginInstallAsync()

Callers

nothing calls this directly

Calls 2

__asyncInstallRoutineMethod · 0.95
debugMethod · 0.80

Tested by

no test coverage detected