Skip to content

Zones

Defined in: sdk/src/worldgen/zones.ts:66

The zones of one world.

new Zones(): Zones

Zones

onChange: ((bounds, zone) => void) | null = null

Defined in: sdk/src/worldgen/zones.ts:72

Told the area every change touched (the zone’s old and new bounds) and the zone there, so only what stands there is placed again.


revision: number = 0

Defined in: sdk/src/worldgen/zones.ts:70

Bumped on every change.

all(): IterableIterator<ZoneDef>

Defined in: sdk/src/worldgen/zones.ts:107

IterableIterator<ZoneDef>


at(x, z, reach?): object[]

Defined in: sdk/src/worldgen/zones.ts:112

The zones that hold at (x, z), with how much, highest priority first.

number

number

number = 0

object[]


delete(id): void

Defined in: sdk/src/worldgen/zones.ts:95

string

void


excluding(x, z, radius, tags, seed): ZoneDef | null

Defined in: sdk/src/worldgen/zones.ts:125

The zone that keeps out something of radius radius carrying tags at (x, z), or null. Inside a zone it is kept out; in its edge it is kept out with the zone’s weight there, by a draw fixed for that place, so the edge thins instead of ending on a line.

number

number

number

readonly string[]

number

ZoneDef | null


get(id): ZoneDef | undefined

Defined in: sdk/src/worldgen/zones.ts:103

string

ZoneDef | undefined


set(zone): void

Defined in: sdk/src/worldgen/zones.ts:86

ZoneDef

void


subscribe(listener): () => void

Defined in: sdk/src/worldgen/zones.ts:75

Listens alongside other consumers; the returned function stops listening.

(bounds, zone) => void

() => void