DeprecatedThis package is deprecated
Launch Module
This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.
Launch
Launch minecraft from a version:
import { Launcher } from "@xmcl/launch"
const version: string; // full version id, like 1.13, or your forge version like, 1.13-forge-<someForgeVersion>
const javaPath: string; // java executable path
const gamePath: string; // .minecraft path
const proc: Promise<ChildProcess> = Launcher.launch({ gamePath, javaPath, version });
Detach from the parent process. So your launcher's exit/crash won't affact the Minecraft running.
const proc: Promise<ChildProcess> = Launcher.launch({ gamePath, javaPath, version, extraExecOption: { detached: true } });