Skip to content

Interface LaunchOption

General launch option, used to generate launch arguments.

🏷️ Properties

accessToken

ts
accessToken: string

Defined in: packages/core/launch.ts:53

extraClassPaths

ts
extraClassPaths: string[]

Add extra classpaths

Defined in: packages/core/launch.ts:168

extraExecOption

ts
extraExecOption: SpawnOptions

Assign the spawn options to the process.

If you try to set { shell: true }, you might want to make all argument rounded with "". The launch function will do it for you, but if you want to spawn process by yourself, remember to do that.

Defined in: packages/core/launch.ts:128

extraJVMArgs

ts
extraJVMArgs: string[]

Extra jvm options. This will append after to generated options. If this is empty, the DEFAULT_EXTRA_JVM_ARGS will be used.

Defined in: packages/core/launch.ts:117

extraMCArgs

ts
extraMCArgs: string[]

Extra program arguments. This will append after to generated options.

Defined in: packages/core/launch.ts:121

features

ts
features: EnabledFeatures

Enable features. Not really in used...

Defined in: packages/core/launch.ts:139

gameIcon

ts
gameIcon: string

The full path of launched game icon Currently, this only supported on MacOS

Defined in: packages/core/launch.ts:75

gameName

ts
gameName: string

The launched game name Currently, this only supported on MacOS

Defined in: packages/core/launch.ts:80

gamePath

ts
gamePath: string

The path of parent directory of saves/logs/configs/mods/resourcepacks

Defined in: packages/core/launch.ts:84

gameProfile

ts
gameProfile: Object

User selected game profile. For game display name &

Defined in: packages/core/launch.ts:49

ignoreInvalidMinecraftCertificates

ts
ignoreInvalidMinecraftCertificates: boolean

Add -Dfml.ignoreInvalidMinecraftCertificates=true to jvm argument

Defined in: packages/core/launch.ts:160

ignorePatchDiscrepancies

ts
ignorePatchDiscrepancies: boolean

Add -Dfml.ignorePatchDiscrepancies=true to jvm argument

Defined in: packages/core/launch.ts:164

isDemo

ts
isDemo: boolean

Defined in: packages/core/launch.ts:129

javaPath

ts
javaPath: string

The java executable file path. (Not the java home directory!)

Defined in: packages/core/launch.ts:92

launcherBrand

ts
launcherBrand: string

Defined in: packages/core/launch.ts:58

launcherName

ts
launcherName: string

Defined in: packages/core/launch.ts:57

maxMemory

ts
maxMemory: number

Min memory, this will add a jvm flag -Xmx to the command result

Defined in: packages/core/launch.ts:100

minMemory

ts
minMemory: number

Min memory, this will add a jvm flag -Xms to the command result

Defined in: packages/core/launch.ts:96

nativeRoot

ts
nativeRoot: string

Native directory. It's .minecraft/versions/<version>/<version>-natives by default. You can replace this by your self.

Defined in: packages/core/launch.ts:135

platform

ts
platform: Platform

The platform of this launch will run. By default, it will fetch the current machine info if this is absent.

Defined in: packages/core/launch.ts:172

prechecks

ts
prechecks: LaunchPrecheck[]

The launcher precheck functions. These will run before it run.

This property is only used for launch function. The generateArguments function won't use this!

Defined in: packages/core/launch.ts:181

properties

ts
properties: object

Defined in: packages/core/launch.ts:55

resolution

ts
resolution: Object

Resolution. This will add --height & --width or --fullscreen to the java arguments

Defined in: packages/core/launch.ts:112

resourcePath

ts
resourcePath: string

The path of parent directory of assets/libraries

Defined in: packages/core/launch.ts:88

server

ts
server: Object

Directly launch to a server

Defined in: packages/core/launch.ts:108

spawn

ts
spawn: Function

Defined in: packages/core/launch.ts:188

userType

ts
userType: "legacy" | "mojang"

Defined in: packages/core/launch.ts:54

version

ts
version: string | ResolvedVersion

The version of launched Minecraft. Can be either resolved version or version string

Defined in: packages/core/launch.ts:104

versionName

ts
versionName: string

Overwrite the version name of the current version. If this is absent, it will use version name from resolved version.

Defined in: packages/core/launch.ts:63

versionType

ts
versionType: string

Overwrite the version type of the current version. If this is absent, it will use version type from resolved version.

Some people use this to show fantastic message on the welcome screen.

Defined in: packages/core/launch.ts:70

yggdrasilAgent

ts
yggdrasilAgent: Object

Support yushi's yggdrasil agent https://github.com/to2mbn/authlib-injector/wiki

Defined in: packages/core/launch.ts:143

Released under the MIT License.