Skip to content
Last Updated
Mar 28, 2025, 03:08

Interface InstallForgeOptions ​

The options to install forge.

🏷️ Properties ​

checkpointHandler optional ​

ts
checkpointHandler: CheckpointHandler

The checkpoint handler to save & restore the download progress Inherited from: InstallProfileOption.checkpointHandler

Defined in: packages/file-transfer/download.ts:52

checksumValidatorResolver optional ​

ts
checksumValidatorResolver: (checksum: ChecksumValidatorOptions) => Validator

Inherited from: InstallProfileOption.checksumValidatorResolver

Defined in: packages/installer/minecraft.ts:120

dispatcher optional ​

ts
dispatcher: Dispatcher

The undici dispatcher Inherited from: InstallProfileOption.dispatcher

Defined in: packages/file-transfer/download.ts:48

handler optional ​

ts
handler: (postProcessor: PostProcessor) => Promise<boolean>

Custom handlers to handle the post processor Inherited from: InstallProfileOption.handler

Defined in: packages/installer/profile.ts:72

headers optional ​

ts
headers: Record<string, any>

The header of the request Inherited from: InstallProfileOption.headers

Defined in: packages/file-transfer/download.ts:40

inheritsFrom optional ​

ts
inheritsFrom: string

When you want to install a version over another one.

Like, you want to install liteloader over a forge version. You should fill this with that forge version id. Inherited from: InstallOptions.inheritsFrom

Defined in: packages/installer/utils.ts:109

java optional ​

ts
java: string

New forge (>=1.13) require java to install. Can be a executor or java executable path. Inherited from: InstallProfileOption.java

Defined in: packages/installer/profile.ts:82

librariesDownloadConcurrency optional ​

ts
librariesDownloadConcurrency: number

Control how many libraries download task should run at the same time. It will override the maxConcurrencyOption if this is presented.

This will be ignored if you have your own downloader assigned. Inherited from: InstallProfileOption.librariesDownloadConcurrency

Defined in: packages/installer/minecraft.ts:118

libraryHost optional ​

ts
libraryHost: LibraryHost

A more flexiable way to control library download url. Inherited from: InstallProfileOption.libraryHost

Defined in: packages/installer/minecraft.ts:107

mavenHost optional ​

ts
mavenHost: string | string[]

The alterative maven host to download library. It will try to use these host from the [0] to the [maven.length - 1]Inherited from: InstallProfileOption.mavenHost

Defined in: packages/installer/minecraft.ts:111

onPostProcessFailed optional ​

ts
onPostProcessFailed: (proc: PostProcessor, jar: string, classPaths: string, mainClass: string, args: string[], error: unknown) => void

Inherited from: InstallProfileOption.onPostProcessFailed

Defined in: packages/installer/profile.ts:74

onPostProcessSuccess optional ​

ts
onPostProcessSuccess: (proc: PostProcessor, jar: string, classPaths: string, mainClass: string, args: string[]) => void

Inherited from: InstallProfileOption.onPostProcessSuccess

Defined in: packages/installer/profile.ts:75

rangePolicy optional ​

ts
rangePolicy: RangePolicy

The range policy to compute the ranges to download Inherited from: InstallProfileOption.rangePolicy

Defined in: packages/file-transfer/download.ts:44

side optional ​

ts
side: "server" | "client"

The installation side

Defined in: packages/installer/forge.ts:144

skipHead optional ​

ts
skipHead: boolean

Inherited from: InstallProfileOption.skipHead

Defined in: packages/file-transfer/download.ts:54

skipPrevalidate optional ​

ts
skipPrevalidate: boolean

Inherited from: InstallProfileOption.skipPrevalidate

Defined in: packages/file-transfer/download.ts:58

skipRevalidate optional ​

ts
skipRevalidate: boolean

Inherited from: InstallProfileOption.skipRevalidate

Defined in: packages/file-transfer/download.ts:56

spawn optional ​

ts
spawn: (command: string, args?: readonly string[], options?: SpawnOptions) => ChildProcess

The 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-spawnInherited from: InstallProfileOption.spawn

Defined in: packages/installer/utils.ts:50

throwErrorImmediately optional ​

ts
throwErrorImmediately: boolean

Inherited from: InstallProfileOption.throwErrorImmediately

Defined in: packages/installer/utils.ts:97

versionId optional ​

ts
versionId: string

Override the newly installed version id.

If this is absent, the installed version id will be either generated or provided by installer. Inherited from: InstallOptions.versionId

Defined in: packages/installer/utils.ts:116