Skip to content

@loontail/minecraft-kit / LaunchAspect

Type Alias: LaunchAspect

ts
type LaunchAspect = {
  compose: Promise<LaunchComposition>;
  preflight: Promise<LaunchPreflightResult>;
  run: LaunchSession;
};

Defined in: src/kit/launch-aspect.ts:26

Shape of kit.launch.

Methods

compose()

ts
compose(target, options): Promise<LaunchComposition>;

Defined in: src/kit/launch-aspect.ts:27

Parameters

ParameterType
targetTarget
optionsLaunchOptions

Returns

Promise<LaunchComposition>


preflight()

ts
preflight(target): Promise<LaunchPreflightResult>;

Defined in: src/kit/launch-aspect.ts:42

Cheap, network-free readiness gate: reports whether every launch-critical file (java executable, version JSON, client jar, classpath entries) is present on disk. The network-free subset of verify.targetReady.run, reporting the same shape.

Parameters

ParameterType
targetTarget

Returns

Promise<LaunchPreflightResult>


run()

ts
run(composition, options?): LaunchSession;

Defined in: src/kit/launch-aspect.ts:36

Spawn the game. The only run in the library that is not async: it returns the live LaunchSession synchronously so the caller holds pid and abort() immediately. awaiting it yields the session, not the exit — wait on session.exited for that.

Throws LAUNCH_JAVA_NOT_FOUND before spawning when composition.javaPath is an absolute path that is not a file.

Parameters

ParameterType
compositionLaunchComposition
options?LaunchRunOptions

Returns

LaunchSession

MIT License