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

Interface AssetsOptions ​

Change the host url of assets download

🏷️ Properties ​

assetsDownloadConcurrency optional ​

ts
assetsDownloadConcurrency: number

Control how many assets 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.

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

assetsHost optional ​

ts
assetsHost: string | string[]

The alternative assets host to download asset. It will try to use these host from the [0] to the [assetsHost.length - 1]

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

assetsIndexUrl optional ​

ts
assetsIndexUrl: string | string[] | (version: ResolvedVersion) => string | string[]

The assets index download or url replacement

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

checkpointHandler optional ​

ts
checkpointHandler: CheckpointHandler

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

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

checksumValidatorResolver optional ​

ts
checksumValidatorResolver: (checksum: ChecksumValidatorOptions) => Validator

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

dispatcher optional ​

ts
dispatcher: Dispatcher

The undici dispatcher Inherited from: DownloadBaseOptions.dispatcher

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

fetch optional ​

ts
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

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

headers optional ​

ts
headers: Record<string, any>

The header of the request Inherited from: DownloadBaseOptions.headers

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

prevalidSizeOnly optional ​

ts
prevalidSizeOnly: boolean

Only precheck the size of the assets. Do not check the hash.

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

rangePolicy optional ​

ts
rangePolicy: RangePolicy

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

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

skipHead optional ​

ts
skipHead: boolean

Inherited from: DownloadBaseOptions.skipHead

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

skipPrevalidate optional ​

ts
skipPrevalidate: boolean

Inherited from: DownloadBaseOptions.skipPrevalidate

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

skipRevalidate optional ​

ts
skipRevalidate: boolean

Inherited from: DownloadBaseOptions.skipRevalidate

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

throwErrorImmediately optional ​

ts
throwErrorImmediately: boolean

Inherited from: ParallelTaskOptions.throwErrorImmediately

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

useHashForAssetsIndex optional ​

ts
useHashForAssetsIndex: boolean

Use hash as the assets index file name. Default is false

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