跳转到内容

ProceduralChunks

此内容尚不支持你的语言。

Defined in: sdk/src/residency/chunks.ts:114

The procedural chunks of every layer. Read ProceduralChunks.status for where they stand.

new ProceduralChunks(): ProceduralChunks

ProceduralChunks

suspended: boolean = false

Defined in: sdk/src/residency/chunks.ts:119

True while something else is showing this world (the editor’s play realm has its own): no place is wanted, so every chunk is let go.

get pending(): number

Defined in: sdk/src/residency/chunks.ts:163

How many chunks every layer still wants made.

number

clear(): void

Defined in: sdk/src/residency/chunks.ts:189

Lets go of every chunk of every layer.

void


has(id): boolean

Defined in: sdk/src/residency/chunks.ts:136

string

boolean


invalidate(id, x0, z0, x1, z1): void

Defined in: sdk/src/residency/chunks.ts:173

Makes the published chunks of layer id that touch the world square [x0, x1] by [z0, z1] again, each keeping its old version until the new one replaces it: what changed there (a zone, a felled tree) changed only them.

string

number

number

number

number

void


remove(id): void

Defined in: sdk/src/residency/chunks.ts:129

Takes a layer away, releasing every chunk it published and stopping what is being made.

string

void


set<T>(id, def): void

Defined in: sdk/src/residency/chunks.ts:122

Adds a layer under id, or takes the new definition of one already there (its chunks stay and follow the new generation).

T

string

ChunkLayer<T>

void


stateAt(id, x, z): ChunkState | null

Defined in: sdk/src/residency/chunks.ts:141

Where the chunk of layer id at world (x, z) (x, y on an ‘xy’ layer) stands, or null when it is not wanted, not made, or there is no such layer.

string

number

number

ChunkState | null


status(id): ChunkLayerStatus | null

Defined in: sdk/src/residency/chunks.ts:150

Layer id’s chunks counted, or null when there is no such layer.

string

ChunkLayerStatus | null


step(hasTime): boolean

Defined in: sdk/src/residency/chunks.ts:197

One frame: releases what no source is near, then makes what is wanted, nearest first across every layer: the chunks a source stands in at once, and the rest while hasTime says so (an async layer’s, all of them).

() => boolean

boolean