Skip to content

Class DownloadForgeInstallerTask

The controller that maintain the download status

🏭 Constructors

constructor

ts
new DownloadForgeInstallerTask(forgeVersion: string, installer: undefined | Object, minecraft: MinecraftFolder, options: InstallForgeOptions): DownloadForgeInstallerTask

Parameters

  • forgeVersion: string
  • installer: undefined | Object
  • minecraft: MinecraftFolder
  • options: InstallForgeOptions

Return Type

  • DownloadForgeInstallerTask

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

🏷️ Properties

_from

ts
_from: undefined | string

Inherited from: DownloadTask._from

Defined in: packages/task/index.ts:80

_id

ts
_id: number = 0

Inherited from: DownloadTask._id

Defined in: packages/task/index.ts:85

_path

ts
_path: string = ''

Inherited from: DownloadTask._path

Defined in: packages/task/index.ts:84

_pausing

ts
_pausing: Promise<void> = ...

Inherited from: DownloadTask._pausing

Defined in: packages/task/index.ts:224

_progress

ts
_progress: number = 0

Inherited from: DownloadTask._progress

Defined in: packages/task/index.ts:82

_promise

ts
_promise: Promise<void>

Inherited from: DownloadTask._promise

Defined in: packages/task/index.ts:75

_state

ts
_state: TaskState = TaskState.Idle

Inherited from: DownloadTask._state

Defined in: packages/task/index.ts:74

_to

ts
_to: undefined | string

Inherited from: DownloadTask._to

Defined in: packages/task/index.ts:81

_total

ts
_total: number = -1

Inherited from: DownloadTask._total

Defined in: packages/task/index.ts:83

abort

ts
abort: Function = ...

Inherited from: DownloadTask.abort

Defined in: packages/installer/downloadTask.ts:5

context

ts
context: TaskContext = {}

Inherited from: DownloadTask.context

Defined in: packages/task/index.ts:88

installJarPath

ts
installJarPath: string

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

name

ts
name: string = ''

Inherited from: DownloadTask.name

Defined in: packages/task/index.ts:90

options

ts
options: DownloadOptions

Inherited from: DownloadTask.options

Defined in: packages/installer/downloadTask.ts:7

param

ts
param: object = {}

Inherited from: DownloadTask.param

Defined in: packages/task/index.ts:91

parent

ts
parent: undefined | Task<any>

Inherited from: DownloadTask.parent

Defined in: packages/task/index.ts:87

reject

ts
reject: Function

Inherited from: DownloadTask.reject

Defined in: packages/task/index.ts:78

resolve

ts
resolve: Function

Inherited from: DownloadTask.resolve

Defined in: packages/task/index.ts:77

resultOrError

ts
resultOrError: any

Inherited from: DownloadTask.resultOrError

Defined in: packages/task/index.ts:93

🔑 Accessors

from

Inherited from: DownloadTask.from

Defined in: packages/task/index.ts:121

id

Inherited from: DownloadTask.id

Defined in: packages/task/index.ts:116

isCancelled

Inherited from: DownloadTask.isCancelled

Defined in: packages/task/index.ts:124

isDone

Inherited from: DownloadTask.isDone

Defined in: packages/task/index.ts:126

isPaused

Inherited from: DownloadTask.isPaused

Defined in: packages/task/index.ts:125

isRunning

Inherited from: DownloadTask.isRunning

Defined in: packages/task/index.ts:127

path

Inherited from: DownloadTask.path

Defined in: packages/task/index.ts:117

progress

Inherited from: DownloadTask.progress

Defined in: packages/task/index.ts:118

state

Inherited from: DownloadTask.state

Defined in: packages/task/index.ts:122

to

Inherited from: DownloadTask.to

Defined in: packages/task/index.ts:120

total

Inherited from: DownloadTask.total

Defined in: packages/task/index.ts:119

🔧 Methods

_onAborted

ts
_onAborted(): void

Return Type

  • void

Inherited from: DownloadTask._onAborted

Defined in: packages/task/index.ts:226

_onResume

ts
_onResume(): void

Return Type

  • void

Inherited from: DownloadTask._onResume

Defined in: packages/task/index.ts:227

_unpause

ts
_unpause(): void

Return Type

  • void

Inherited from: DownloadTask._unpause

Defined in: packages/task/index.ts:225

cancel

ts
cancel(timeout: number): Promise<void>

Parameters

  • timeout: number

Return Type

  • Promise<void>

Inherited from: DownloadTask.cancel

Defined in: packages/task/index.ts:145

cancelTask

ts
cancelTask(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.cancelTask

Defined in: packages/task/index.ts:233

get

ts
get(): void

Return Type

  • void

Inherited from: DownloadTask.get

Defined in: packages/task/index.ts:108

isAbortedError

ts
isAbortedError(e: any): boolean

Parameters

  • e: any

Return Type

  • boolean

Inherited from: DownloadTask.isAbortedError

Defined in: packages/installer/downloadTask.ts:47

map

ts
map(transform: Transform<DownloadForgeInstallerTask, N>): Task<N extends Promise<R> ? R : N>

Parameters

  • transform: Transform<DownloadForgeInstallerTask, N>

Return Type

  • Task<N extends Promise<R> ? R : N>

Inherited from: DownloadTask.map

Defined in: packages/task/index.ts:212

onChildUpdate

ts
onChildUpdate(chunkSize: number): void

Parameters

  • chunkSize: number

Return Type

  • void

Inherited from: DownloadTask.onChildUpdate

Defined in: packages/task/index.ts:205

onProgress

ts
onProgress(url: URL, chunkSize: number, progress: number, total: number): void

Parameters

  • url: URL
  • chunkSize: number
  • progress: number
  • total: number

Return Type

  • void

Inherited from: DownloadTask.onProgress

Defined in: packages/installer/downloadTask.ts:13

pause

ts
pause(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.pause

Defined in: packages/task/index.ts:129

pauseTask

ts
pauseTask(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.pauseTask

Defined in: packages/task/index.ts:240

process

ts
process(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.process

Defined in: packages/installer/downloadTask.ts:20

resume

ts
resume(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.resume

Defined in: packages/task/index.ts:137

resumeTask

ts
resumeTask(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.resumeTask

Defined in: packages/task/index.ts:250

runTask

ts
runTask(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.runTask

Defined in: packages/task/index.ts:257

setName

ts
setName(name: string, param: object): DownloadForgeInstallerTask

Parameters

  • name: string
  • param: object

Return Type

  • DownloadForgeInstallerTask

Inherited from: DownloadTask.setName

Defined in: packages/task/index.ts:102

start

ts
start(context: TaskContext, parent: Task<any>): void

Parameters

  • context: TaskContext
  • parent: Task<any>

Return Type

  • void

Inherited from: DownloadTask.start

Defined in: packages/task/index.ts:164

startAndWait

ts
startAndWait(context: TaskContext, parent: Task<any>): Promise<void>

Parameters

  • context: TaskContext
  • parent: Task<any>

Return Type

  • Promise<void>

Inherited from: DownloadTask.startAndWait

Defined in: packages/task/index.ts:195

update

ts
update(chunkSize: number): void

Parameters

  • chunkSize: number

Return Type

  • void

Inherited from: DownloadTask.update

Defined in: packages/task/index.ts:200

wait

ts
wait(): Promise<void>

Return Type

  • Promise<void>

Inherited from: DownloadTask.wait

Defined in: packages/task/index.ts:160

Released under the MIT License.