Skip to content

API reference / @jsprismarine/prismarine / world/BlockUpdateScheduler

world/BlockUpdateScheduler ​

Classes ​

Interfaces ​

BlockUpdate ​

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:38

Integer world coordinates queued for a block-physics check.

Properties ​

x ​

x: number

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:39

y ​

y: number

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:40

z ​

z: number

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:41

Type Aliases ​

BlockUpdateObserver ​

BlockUpdateObserver = (x, y, z, before, after) => void

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:48

Hears one change to the queue: a position queued, moved to an earlier tick or taken off. The due tick before and after, null for no update at the position.

Parameters ​

x ​

number

y ​

number

z ​

number

before ​

number | null

after ​

number | null

Returns ​

void

Variables ​

BLOCK_UPDATE_BUDGET_PER_TICK ​

const BLOCK_UPDATE_BUDGET_PER_TICK: 4096 = 4096

Defined in: packages/prismarine/src/world/BlockUpdateScheduler.ts:30

How many updates one tick may process before leaving the rest for the next.

A count and nothing else, so the same queue drains the same way on every host. A host too slow to run this many in a tick's period ticks slower and does not process fewer.

References ​

blockUpdateScheduler ​

Renames and re-exports BlockUpdateScheduler