[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / [entity/data/EntityStore](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md) / EntityStore

# Class: EntityStore

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:87](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L87)

One world's data-driven entities, by runtime id, and the change log of their state.

## Constructors

### Constructor

> **new EntityStore**(`report?`): `EntityStore`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:111](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L111)

#### Parameters

##### report?

(`message`) => `void`

Receives a line for each inverse that failed.

#### Returns

`EntityStore`

## Accessors

### broken

#### Get Signature

> **get** **broken**(): `unknown`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:419](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L419)

The first inverse that failed to write, or undefined while the store can be trusted.
A world whose store is broken stops ticking.

##### Returns

`unknown`

***

### size

#### Get Signature

> **get** **size**(): `number`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:129](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L129)

How many members the store holds.

##### Returns

`number`

***

### tick

#### Get Signature

> **get** **tick**(): `number`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:396](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L396)

The number of the open tick, or of the last one sealed, counted from 1 by the store; 0
before the first. A clock that only goes forward, which a meal is counted out on.

##### Returns

`number`

***

### tickOpen

#### Get Signature

> **get** **tickOpen**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:401](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L401)

Whether a tick is open, so writes are logged.

##### Returns

`boolean`

## Methods

### addInverseWriter()

> **addInverseWriter**(`writer`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:354](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L354)

Registers a writer for inverse entries; the first one that knows the entity writes it.

#### Parameters

##### writer

[`InverseWriter`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#inversewriter)

#### Returns

`void`

***

### admit()

> **admit**(`entity`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:137](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L137)

Takes in an entity that is still being built. Queries find it from now on, and its
writes are not logged until [EntityStore.enter](#enter) records it.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

#### Returns

`void`

***

### afterUnit()

> **afterUnit**(`work`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:347](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L347)

Runs work once the open unit, and every unit around it, has ended, and tells it whether the
writes made so far still stand: false when one of those units threw and was undone. This is
for what cannot be put back and so cannot wait in [EntityStore.undoWith](#undowith): a packet, a
chat line, a player's leave once its goodbye is queued. Work that only stands with the
unit's writes waits for `true`; work that happens either way ignores the flag. It runs once
the undo has finished, so its writes are logged like any others.

Work registered in a unit runs after every unit around it closed, in the order registered.
A throw from it is reported and does not stop the rest, since the unit's outcome is settled
by then. With no unit open, the work runs now and is told `true`, and a throw passes
through, as it would have from the caller.

#### Parameters

##### work

(`kept`) => `void`

What to run, told whether the writes made before this call were kept.

#### Returns

`void`

***

### beginTick()

> **beginTick**(): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:359](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L359)

Opens the next tick of the log, or does nothing when one is already open.

#### Returns

`void`

***

### chunk()

> **chunk**(`change`, `x`, `z`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:293](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L293)

Appends a chunk entry, which names a chunk that entered or left the world.

A chunk admitted at the input step enters outside every unit. Only a chunk applied while
no tick loop runs, as in a test, can enter inside one, and a chunk entry has no inverse,
so every open unit is pinned: if it throws, its writes stay and the failure is reported.

#### Parameters

##### change

`"leave"` \| `"enter"`

##### x

`number`

##### z

`number`

#### Returns

`void`

***

### counts()

> **counts**(): [`EntityStoreCounts`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#entitystorecounts)

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:411](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L411)

What the store counted, for reports.

#### Returns

[`EntityStoreCounts`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#entitystorecounts)

***

### detach()

> **detach**(`entity`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:159](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L159)

Takes an entity out of the store. Its own writes stop being logged; call
[EntityStore.recordLeave](#recordleave) once its removal has finished.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

#### Returns

`void`

***

### enter()

> **enter**(`entity`, `saved`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:145](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L145)

Records that an admitted entity has entered the world, with the saved form it entered
with. Its writes are logged from now on.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

##### saved

[`PlainRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plainrecord)

#### Returns

`void`

***

### failed()

> **failed**(`id`): `boolean`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:450](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L450)

Counts one more failed update for an entity and marks it skipped for the rest of the tick.

#### Parameters

##### id

`number`

#### Returns

`boolean`

Whether the entity has now failed [ENTITY\_FAILURE\_LIMIT](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#entity_failure_limit) updates in a row.

***

### get()

> **get**(`id`): [`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:114](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L114)

The member with this runtime id, or undefined when the store holds none.

#### Parameters

##### id

`number`

#### Returns

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md) \| `undefined`

***

### has()

> **has**(`id`): `boolean`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:119](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L119)

Whether the store holds an entity with this runtime id.

#### Parameters

##### id

`number`

#### Returns

`boolean`

***

### hasEntered()

> **hasEntered**(`entity`): `boolean`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:151](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L151)

Whether a member's entering entry has been recorded, so its writes are logged.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

#### Returns

`boolean`

***

### isSkipped()

> **isSkipped**(`id`): `boolean`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:463](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L463)

Whether an entity failed earlier in this tick and is skipped until the next.

#### Parameters

##### id

`number`

#### Returns

`boolean`

***

### lastSealed()

> **lastSealed**(): [`SealedTick`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeLog/index.md#sealedtick) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:406](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L406)

The last sealed tick, until the next tick begins, or undefined when there is none.

#### Returns

[`SealedTick`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeLog/index.md#sealedtick) \| `undefined`

***

### occurred()

> **occurred**(`entry`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:282](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L282)

Appends an occurrence, which changes no state: something replication sends, or the
record of an action a guard vetoed.

#### Parameters

##### entry

[`OccurrenceEntry`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeEntry/index.md#occurrenceentry)

#### Returns

`void`

***

### onSealed()

> **onSealed**(`listener`): () => `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:387](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L387)

Hears every tick as it seals. Replication will be the reader; until then the replay
scenarios count entries and bytes per tick through this.

#### Parameters

##### listener

(`sealed`) => `void`

#### Returns

A function that removes the listener.

() => `void`

***

### recordLeave()

> **recordLeave**(`id`, `saved`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:170](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L170)

Records that an entity left, with the saved form it had before its removal began. Called
last, so that undoing the removal adds the entity back before the changes its removal made
to other entities are undone.

#### Parameters

##### id

`number`

##### saved

[`PlainRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plainrecord)

#### Returns

`void`

***

### replay()

> **replay**(`entries`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:305](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L305)

Writes the state each entry leads to, forward, through the registered writers and without
logging: a field takes its after-value, an entering entity is added from its saved form
and a leaving one is removed. A store built from a snapshot reaches the live store's state
this way, which is what makes a snapshot plus the log a replay.

#### Parameters

##### entries

`Iterable`\<[`ChangeEntry`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeEntry/index.md#changeentry)\>

#### Returns

`void`

#### Throws

When no writer knows an entry's entity.

***

### sealTick()

> **sealTick**(`header?`): [`SealedTick`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeLog/index.md#sealedtick) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:374](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L374)

Seals the open tick, which is what the tick's close phase does.

#### Parameters

##### header?

What the world's own clocks and in-flight work are now, which no entry carries.

###### gameRules

readonly (readonly \[`string`, readonly \[`number` \| `boolean`, `boolean`\]\])[]

Every game rule, as its name, its value and whether it can be edited.

###### pendingChunkLoads

readonly (readonly \[`number`, `string`\])[]

Each chunk load in flight, as its packed position and its urgency, by position.

###### pendingLighting

\{ `deferred`: `number`; `queued`: `number`; \}

How deep the light queue is.

###### pendingLighting.deferred

`number`

###### pendingLighting.queued

`number`

###### randomTickState

`number`

The state of the generator that draws random tick positions.

###### settlingChunks

readonly `number`[]

The freshly generated chunks still settling, as packed positions in ascending order.

###### tick

`number`

The level clock, as `World.getTicks` reads it.

###### weather

\{ `clearWeatherTime`: `number`; `raining`: `boolean`; `rainTime`: `number`; `thundering`: `boolean`; `thunderTime`: `number`; \}

The level's weather, as a save holds it.

###### weather.clearWeatherTime

`number`

###### weather.raining

`boolean`

###### weather.rainTime

`number`

###### weather.thundering

`boolean`

###### weather.thunderTime

`number`

#### Returns

[`SealedTick`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/ChangeLog/index.md#sealedtick) \| `undefined`

The sealed tick, or undefined when no tick was open.

***

### succeeded()

> **succeeded**(`id`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:458](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L458)

Clears an entity's run of failures after an update that finished.

#### Parameters

##### id

`number`

#### Returns

`void`

***

### undoWith()

> **undoWith**(`undo`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:327](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L327)

Registers how to put back a write the log does not carry, such as a grace period or a death
in progress, for the open unit to run if it throws. A unit that finishes hands its undos to
the unit around it. Outside a unit, or during an undo, this does nothing.

The undos run after the unit's inverse entries, so an undo that puts back a removed
entity's state finds the entity the undone removal added back, by its runtime id.

#### Parameters

##### undo

() => `void`

Puts the state back as it was when this was called.

#### Returns

`void`

***

### unit()

> **unit**(`work`): [`UnitOutcome`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#unitoutcome)

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:430](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L430)

Runs one unit of work in a span of its own. When it throws, the span is reverted and the
error is returned instead of thrown.

With no tick open there is nothing to revert from, so the work runs as it is and a throw
passes through, as it did before the store existed.

#### Parameters

##### work

() => `void`

#### Returns

[`UnitOutcome`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/EntityStore/index.md#unitoutcome)

***

### values()

> **values**(): `IterableIterator`\<[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)\>

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:124](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L124)

Every member, in the order they were admitted.

#### Returns

`IterableIterator`\<[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)\>

***

### written()

> **written**(`entity`, `field`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:182](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L182)

Logs one change to a member's state, with its value before and after.

A write by an entity that has not entered, or that is leaving, is part of a saved form
and is dropped. Values are copied into plain data here, so a caller may pass the live
value it just stored.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

##### field

`string`

The field's name in the entry's address, such as `position` or `component:minecraft:breathable`.

##### before

`unknown`

##### after

`unknown`

#### Returns

`void`

***

### writtenBlock()

> **writtenBlock**(`x`, `y`, `z`, `layer`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:236](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L236)

Logs one change to the block at a position, as block runtime ids.

#### Parameters

##### x

`number`

##### y

`number`

##### z

`number`

##### layer

`number`

The storage layer, 0 for the block and 1 for what is waterlogged into it.

##### before

`number`

##### after

`number`

#### Returns

`void`

***

### writtenBlockEntity()

> **writtenBlockEntity**(`x`, `y`, `z`, `field`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:245](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L245)

Logs one change to one field of the block entity at a position
(`blockentity/blockEntityLog.ts` names the fields), with its value before and after.

#### Parameters

##### x

`number`

##### y

`number`

##### z

`number`

##### field

`string`

##### before

[`PlainData`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plaindata)

##### after

[`PlainData`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plaindata)

#### Returns

`void`

***

### writtenBlockUpdate()

> **writtenBlockUpdate**(`x`, `y`, `z`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:261](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L261)

Logs one change to the block update queue: a position queued, moved to an earlier tick or
taken off, as the tick it comes due before and after, or null for none.

#### Parameters

##### x

`number`

##### y

`number`

##### z

`number`

##### before

`number` \| `null`

##### after

`number` \| `null`

#### Returns

`void`

***

### writtenFrozen()

> **writtenFrozen**(`entity`, `field`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:197](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L197)

[EntityStore.written](#written) for values that are already immutable plain data, such as an
entity's frozen component state, which the log can hold as they are.

Copying them would give the same entry. Skipping the copy matters because a mob's
component timers, such as its ambient sound countdown, change every tick, so this runs
for nearly every mob on every tick.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

##### field

`string`

##### before

[`PlainData`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plaindata)

The value before the write. The caller never changes it afterwards.

##### after

[`PlainData`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plaindata)

The value after the write. The caller never changes it afterwards.

#### Returns

`void`

***

### writtenLegacy()

> **writtenLegacy**(`id`, `field`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:206](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L206)

Logs one change to an entity the store does not hold, addressed by its runtime id: a rider
whose ride changed after its entity left the store.

#### Parameters

##### id

`number` \| `bigint`

##### field

`string`

##### before

`unknown`

##### after

`unknown`

#### Returns

`void`

***

### writtenScheduledTick()

> **writtenScheduledTick**(`address`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:270](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L270)

Logs one scheduled block or fluid tick queued or taken off, with its timing before and
after, or null for none.

#### Parameters

##### address

###### list

`"block"` \| `"fluid"`

###### type

`string`

###### x

`number`

###### y

`number`

###### z

`number`

##### before

\{ `priority`: `number`; `subTickOrder`: `number`; `triggerTick`: `number`; \} \| `null`

##### after

\{ `priority`: `number`; `subTickOrder`: `number`; `triggerTick`: `number`; \} \| `null`

#### Returns

`void`

***

### writtenSlot()

> **writtenSlot**(`id`, `container`, `slot`, `before`, `after`): `void`

Defined in: [packages/prismarine/src/entity/data/EntityStore.ts:214](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/EntityStore.ts#L214)

Logs one change to one slot of an entity's container, addressed by its runtime id.

#### Parameters

##### id

`number` \| `bigint`

##### container

`string`

Which of the entity's containers, such as `inventory` or `armor`.

##### slot

`number`

##### before

[`PlainRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plainrecord) \| `null`

##### after

[`PlainRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/changelog/PlainData/index.md#plainrecord) \| `null`

#### Returns

`void`
