Skip to content

API reference / @jsprismarine/prismarine / world/changelog/ChangeLog

world/changelog/ChangeLog ​

Classes ​

Type Aliases ​

ChangeAddress ​

ChangeAddress = object

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:10

Where an entry sits in the history: the tick that appended it and its position in that tick. Sequence numbers start at zero in every tick and have no gaps.

Properties ​

sequence ​

readonly sequence: number

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:14

The entry's position among the tick's entries.

tick ​

readonly tick: number

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:12

The tick that appended the entry.


InverseApplier ​

InverseApplier = (inverse) => void

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:47

Writes one inverse entry to the caller's store, without appending it to the log.

A field entry sets address to after. A membership entry adds the entity from saved when it enters and removes it when it leaves.

Parameters ​

inverse ​

StateEntry

Returns ​

void


SealedTick ​

SealedTick = object

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:21

One tick's entries after the tick closed. It is plain data, so a consumer can hand it to another thread as it is. An entry's sequence number is its index in entries.

Properties ​

entries ​

readonly entries: readonly ChangeEntry[]

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:25

The tick's entries in append order.

readonly optional header?: TickHeader

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:27

What the world's own clocks and in-flight work were as the tick sealed, when the world gave it.

tick ​

readonly tick: number

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:23

The tick these entries belong to.


Span ​

Span = object

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:34

The entries one unit of work appended, from startSpan until closeSpan or revertSpan. A handle only: the log compares spans by identity.

Properties ​

start ​

readonly start: number

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:38

The sequence number of the span's first entry.

tick ​

readonly tick: number

Defined in: packages/prismarine/src/world/changelog/ChangeLog.ts:36

The tick the span belongs to. A span never outlives its tick.