Skip to content

API reference / @jsprismarine/prismarine / entity/data/EntityStore

entity/data/EntityStore ​

Classes ​

Interfaces ​

EntityStoreCounts ​

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:74

What the store reports about itself, by count.

Properties ​

kept ​

readonly kept: number

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:83

Units that threw and kept their writes, because a chunk entered inside them.

reverted ​

readonly reverted: number

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:81

Units that threw and were reverted.

unlogged ​

readonly unlogged: number

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:79

Entries the log could not hold because no tick was open, such as a chunk between ticks. State entries and the occurrences replication sends are held for the next tick instead.

Type Aliases ​

InverseWriter ​

InverseWriter = (inverse) => boolean

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:66

Writes one inverse entry back to the state it describes, without logging it.

Parameters ​

inverse ​

StateEntry

Returns ​

boolean

Whether the writer knew the entity the entry addresses. The store asks each writer in the order it was registered.


UnitOutcome ​

UnitOutcome = { failed: false; } | { error: unknown; failed: true; }

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:69

How a unit of work ended.

Variables ​

ENTITY_FAILURE_LIMIT ​

const ENTITY_FAILURE_LIMIT: 3 = 3

Defined in: packages/prismarine/src/entity/data/EntityStore.ts:58

How many updates in a row an entity may fail before the store removes it. One failure can be a bad neighbor or a bad block; a run of them is the entity itself.