Interface LaunchOption
General launch option, used to generate launch arguments.
🏷️ Properties
accessToken optional
accessToken: stringDefined in: packages/core/launch.ts:53
extraClassPaths optional
extraClassPaths: string[]Add extra classpaths
Defined in: packages/core/launch.ts:172
extraExecOption optional
extraExecOption: SpawnOptionsAssign 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:132
extraJVMArgs optional
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 optional
extraMCArgs: string[]Extra program arguments. This will append after to generated options.
Defined in: packages/core/launch.ts:121
features optional
features: EnabledFeaturesEnable features. Not really in used...
Defined in: packages/core/launch.ts:143
gameIcon optional
gameIcon: stringThe full path of launched game icon Currently, this only supported on MacOS
Defined in: packages/core/launch.ts:75
gameName optional
gameName: stringThe launched game name Currently, this only supported on MacOS
Defined in: packages/core/launch.ts:80
gamePath
gamePath: stringThe path of parent directory of saves/logs/configs/mods/resourcepacks
Defined in: packages/core/launch.ts:84
gameProfile optional
gameProfile: { id: string; name: string }User selected game profile. For game display name &
Defined in: packages/core/launch.ts:49
ignoreInvalidMinecraftCertificates optional
ignoreInvalidMinecraftCertificates: booleanAdd -Dfml.ignoreInvalidMinecraftCertificates=true to jvm argument
Defined in: packages/core/launch.ts:164
ignorePatchDiscrepancies optional
ignorePatchDiscrepancies: booleanAdd -Dfml.ignorePatchDiscrepancies=true to jvm argument
Defined in: packages/core/launch.ts:168
isDemo optional
isDemo: booleanDefined in: packages/core/launch.ts:133
javaPath
javaPath: stringThe java executable file path. (Not the java home directory!)
Defined in: packages/core/launch.ts:92
launcherBrand optional
launcherBrand: stringDefined in: packages/core/launch.ts:58
launcherName optional
launcherName: stringDefined in: packages/core/launch.ts:57
maxMemory optional
maxMemory: numberMin memory, this will add a jvm flag -Xmx to the command result
Defined in: packages/core/launch.ts:100
minMemory optional
minMemory: numberMin memory, this will add a jvm flag -Xms to the command result
Defined in: packages/core/launch.ts:96
nativeRoot optional
nativeRoot: stringNative directory. It's .minecraft/versions/<version>/<version>-natives by default. You can replace this by your self.
Defined in: packages/core/launch.ts:139
platform optional
platform: PlatformThe 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:176
prechecks optional
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:188
prependCommand optional
prependCommand: string | string[]Prepend command before java command.
Defined in: packages/core/launch.ts:125
properties optional
properties: objectDefined in: packages/core/launch.ts:55
resolution optional
resolution: { fullscreen?: true; height?: number; width?: number }Resolution. This will add --height & --width or --fullscreen to the java arguments
Defined in: packages/core/launch.ts:112
resourcePath optional
resourcePath: stringThe path of parent directory of assets/libraries
Defined in: packages/core/launch.ts:88
server optional
server: { ip: string; port?: number }Directly launch to a server
Defined in: packages/core/launch.ts:108
spawn optional
spawn: (command: string, args?: readonly string[], options?: SpawnOptions) => ChildProcessThe spawn process function. Used for spawn the java process at the end.
By default, it will be the spawn function from "child_process" module. You can use this option to change the 3rd party spawn like cross-spawn
Defined in: packages/core/launch.ts:195
useHashAssetsIndex optional
useHashAssetsIndex: booleanUse hash assets index. This will use the assets index hash as the assets index name.
Defined in: packages/core/launch.ts:180
userType optional
userType: "mojang" | "legacy"Defined in: packages/core/launch.ts:54
version
version: string | ResolvedVersionThe version of launched Minecraft. Can be either resolved version or version string
Defined in: packages/core/launch.ts:104
versionName optional
versionName: stringOverwrite 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 optional
versionType: stringOverwrite 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 optional
yggdrasilAgent: { jar: string; prefetched?: string; server: string }Support yushi's yggdrasil agent https://github.com/to2mbn/authlib-injector/wiki
Defined in: packages/core/launch.ts:147