Skip to content

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

entity/data/storeActors ​

Classes ​

Interfaces ​

StoreActorBlows ​

Defined in: packages/prismarine/src/entity/data/storeActors.ts:78

Where a store actor sends the blows and heals the rest of the server gives it.

Methods ​

heal() ​

heal(entity, amount, cause?): boolean

Defined in: packages/prismarine/src/entity/data/storeActors.ts:84

A heal, which the store applies up to the entity's maximum.

Parameters ​
entity ​

DataEntity

amount ​

number

cause? ​

HealCause

Returns ​

boolean

hurt() ​

hurt(entity, amount, source, route): boolean

Defined in: packages/prismarine/src/entity/data/storeActors.ts:80

A blow through StoreActor.damage or a status effect, run through the store's pipeline.

Parameters ​
entity ​

DataEntity

amount ​

number

source ​

DamageSource

route ​

DamageRoute

Returns ​

boolean

written() ​

written(entity, taken, source): void

Defined in: packages/prismarine/src/entity/data/storeActors.ts:82

A lower health written through StoreActor.setHealth, by how much it is lower.

Parameters ​
entity ​

DataEntity

taken ​

number

source ​

DamageSource

Returns ​

void


StoreActorsOptions ​

Defined in: packages/prismarine/src/entity/data/storeActors.ts:588

What StoreActors is built over.

Properties ​

blows ​

readonly blows: StoreActorBlows

Defined in: packages/prismarine/src/entity/data/storeActors.ts:594

Where each actor sends the blows and heals the rest of the server gives it.

Methods ​

builtInActor()? ​

optional builtInActor(entity, world, blows): StoreActor | undefined

Defined in: packages/prismarine/src/entity/data/storeActors.ts:604

The actor of a dropped stack or of a saved actor no pack declares, which entity/data/live.ts builds, or undefined for an entity that gets a plain StoreActor.

Parameters ​
entity ​

DataEntity

world ​

World

blows ​

StoreActorBlows

Returns ​

StoreActor | undefined

playerActor()? ​

optional playerActor(entity, world, blows): StoreActor | undefined

Defined in: packages/prismarine/src/entity/data/storeActors.ts:599

The actor of a store player, which entity/data/storePlayers.ts builds from the player's profile, or undefined for any other entity, which gets a plain StoreActor.

Parameters ​
entity ​

DataEntity

world ​

World

blows ​

StoreActorBlows

Returns ​

StoreActor | undefined

report() ​

report(message): void

Defined in: packages/prismarine/src/entity/data/storeActors.ts:592

Receives everything the actors met and could not carry out.

Parameters ​
message ​

string

Returns ​

void

world() ​

world(): World | undefined

Defined in: packages/prismarine/src/entity/data/storeActors.ts:590

The live world, read at call time, because the runtime outlives any one world load.

Returns ​

World | undefined

Variables ​

INERT_ACTOR ​

const INERT_ACTOR: "jsprismarine:inert_actor" = 'jsprismarine:inert_actor'

Defined in: packages/prismarine/src/entity/data/storeActors.ts:551

The type a saved actor no loaded pack declares is held under: the entity overlay's jsprismarine:inert_actor, which has health and nothing else, so it stands still and runs no behavior.

Functions ​

savedWithChunk() ​

savedWithChunk(entity): boolean

Defined in: packages/prismarine/src/entity/data/storeActors.ts:75

Whether a world save writes a store entity with its chunk, which Bedrock's minecraft:transient turns off.

Parameters ​

entity ​

DataEntity

The store entity.

Returns ​

boolean