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

# Class: StoreActor

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:91](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L91)

One store entity as the network layer and the rest of the server read it, from the store on
every call.

## Extended by

- [`InertActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/classes/InertActor.md)
- [`StorePlayerActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storePlayers/classes/StorePlayerActor.md)
- [`ItemActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/itemActor/classes/ItemActor.md)

## Implements

- [`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor)

## Constructors

### Constructor

> **new StoreActor**(`entity`, `world`, `blows`): `StoreActor`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:101](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L101)

#### Parameters

##### entity

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

The store entity behind the actor.

##### world

[`World`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/World/classes/World.md)

##### blows

[`StoreActorBlows`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/index.md#storeactorblows)

#### Returns

`StoreActor`

## Properties

### entity

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

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:103](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L103)

The store entity behind the actor.

## Accessors

### attributes

#### Get Signature

> **get** **attributes**(): `Attributes`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:127](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L127)

The actor's attributes, with the store's health and its maximum now, which a save and the
replay digest read.

##### Returns

`Attributes`

The attributes a client is sent.

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`attributes`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#attributes)

***

### headYaw

#### Get Signature

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

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:195](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L195)

Where the entity's head faces, which a look turns apart from its body.

##### Returns

`number`

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`headYaw`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#headyaw)

***

### metadata

#### Get Signature

> **get** **metadata**(): [`Metadata`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/Metadata.md)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:115](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L115)

The actor metadata the store state projects to now, with the type's box: what a player's
own client and a save read. It leaves out who holds the entity's leash, which only other
clients are shown, and they are sent the replica's metadata.

##### Returns

[`Metadata`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/Metadata.md)

The actor metadata a client is sent, flags and properties both.

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`metadata`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#metadata)

***

### persistentNbt

#### Get Signature

> **get** **persistentNbt**(): [`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:141](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L141)

The actor record tags this server does not model, which the next save writes back, such
as the actor's `UniqueID`. A save writes the entity's record into them first.

They are kept in the store, as network NBT bytes in a logged field, so this answers a new
compound on every read: change one by assigning it back.

##### Returns

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

#### Set Signature

> **set** **persistentNbt**(`tags`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:146](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L146)

##### Parameters

###### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

##### Returns

`void`

***

### pitch

#### Get Signature

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

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:186](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L186)

##### Returns

`number`

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`pitch`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#pitch)

***

### yaw

#### Get Signature

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

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:190](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L190)

##### Returns

`number`

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`yaw`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#yaw)

## Methods

### addStatusEffect()

> **addStatusEffect**(`input`, `notify?`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:353](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L353)

Applies or refreshes a status effect in the store, unless the entity's
`minecraft:mob_effect_immunity` refuses it, merging with an effect already running.

#### Parameters

##### input

[`StatusEffectInput`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffectinput)

##### notify?

`boolean` = `true`

Whether to tell clients about an accepted change.

#### Returns

`boolean`

Whether the effect changed.

***

### addTag()

> **addTag**(`tag`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:325](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L325)

Adds a `/tag` tag.

#### Parameters

##### tag

`string`

#### Returns

`boolean`

Whether the entity did not already carry it.

***

### applyImpulse()

> **applyImpulse**(`impulse`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:303](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L303)

Adds an impulse to the entity body the runtime integrates each tick.

#### Parameters

##### impulse

[`EntityPosition`](https://jsprismarine.dev/api/@jsprismarine/entities/index.md#entityposition)

#### Returns

`void`

***

### applyKnockback()

> **applyKnockback**(`directionX`, `directionZ`, `strength`, `damping?`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:312](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L312)

Shoves the entity: vanilla's rule is that each shove halves whatever motion the last one
left before adding its own, which is what makes a sprint hit both throw harder and cancel
more of the run the target was making.

#### Parameters

##### directionX

`number`

##### directionZ

`number`

##### strength

`number`

##### damping?

`number` = `0.5`

#### Returns

`void`

***

### claimUpdate()

> **claimUpdate**(`tick`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:462](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L462)

Claims the entity's one update of a server tick, so a world that ticks it twice runs it once.

#### Parameters

##### tick

`number`

#### Returns

`boolean`

***

### clearStatusEffects()

> **clearStatusEffects**(`notify?`): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:389](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L389)

Removes every active status effect.

#### Parameters

##### notify?

`boolean` = `true`

#### Returns

`number`

How many were cleared.

***

### damage()

> **damage**(`amount`, `source?`): `Promise`\<`boolean`\>

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:281](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L281)

Hands a blow to the store's damage pipeline, which decides it and applies it before this
returns.

#### Parameters

##### amount

`number`

##### source?

[`DamageCause`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/DamageCause/index.md#damagecause-1) \| [`DamageSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/DamageSource/classes/DamageSource.md) = `DamageCause.Generic`

#### Returns

`Promise`\<`boolean`\>

***

### getBox()

> **getBox**(): [`EntityBox`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/facts/index.md#entitybox)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:233](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L233)

How big the entity is, from its type's collision box.

#### Returns

[`EntityBox`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/facts/index.md#entitybox)

***

### getDefaultPortalCooldown()

> **getDefaultPortalCooldown**(): `number`

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

How long the entity refuses portals after a dimension change: a player's half second for a
boat, a raft or a minecart and for an entity a player rides in front of, fifteen seconds for
anything else.

#### Returns

`number`

***

### getEquipment()

> **getEquipment**(): [`ViewableEquipment`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/predicateView/index.md#viewableequipment)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:213](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L213)

#### Returns

[`ViewableEquipment`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/predicateView/index.md#viewableequipment)

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getEquipment`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getequipment)

***

### getFeetY()

> **getFeetY**(): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:228](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L228)

Where the bottom of the body is, which for a store entity is its position.

#### Returns

`number`

***

### getHealth()

> **getHealth**(): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:248](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L248)

The entity's health in the store, or zero for a type with no health.

#### Returns

`number`

***

### getMaxHealth()

> **getMaxHealth**(): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:253](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L253)

The entity's maximum health in the store, or zero for a type with no health.

#### Returns

`number`

***

### getName()

> **getName**(): `string`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:238](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L238)

The entity's name tag, or an empty string when it has none.

#### Returns

`string`

***

### getPortalCooldown()

> **getPortalCooldown**(): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:421](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L421)

Ticks left before the entity may enter a portal again.

#### Returns

`number`

***

### getPortalTransitionTicks()

> **getPortalTransitionTicks**(`_rule?`): `number`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:402](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L402)

Ticks a non-player entity waits in a portal before it goes through, which is none.

#### Parameters

##### \_rule?

[`PortalRule`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/portal/rules/index.md#portalrule)

#### Returns

`number`

***

### getPosition()

> **getPosition**(): [`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:176](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L176)

#### Returns

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getPosition`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getposition)

***

### getRuntimeId()

> **getRuntimeId**(): `bigint`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:166](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L166)

#### Returns

`bigint`

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getRuntimeId`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getruntimeid)

***

### getServer()

> **getServer**(): [`Server`](https://jsprismarine.dev/api/@jsprismarine/prismarine/Server/classes/Server.md)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:161](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L161)

The server the world belongs to.

#### Returns

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

***

### getStatusEffect()

> **getStatusEffect**(`identifier`): [`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:337](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L337)

One active effect by its namespaced id or bare Bedrock name.

#### Parameters

##### identifier

`string`

#### Returns

[`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect) \| `undefined`

***

### getStatusEffects()

> **getStatusEffects**(): readonly [`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect)[]

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:218](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L218)

#### Returns

readonly [`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect)[]

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getStatusEffects`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getstatuseffects)

***

### getSyncedProperties()

> **getSyncedProperties**(): [`SyncedProperties`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/SyncedProperties.md)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:208](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L208)

#### Returns

[`SyncedProperties`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/SyncedProperties.md)

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getSyncedProperties`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getsyncedproperties)

***

### getTags()

> **getTags**(): readonly `string`[]

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:320](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L320)

The `/tag` tags of the entity.

#### Returns

readonly `string`[]

***

### getType()

> **getType**(): `string`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:171](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L171)

#### Returns

`string`

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getType`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#gettype)

***

### getVelocity()

> **getVelocity**(): [`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

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

#### Returns

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`getVelocity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#getvelocity)

***

### getWorld()

> **getWorld**(): [`World`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/World/classes/World.md)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:156](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L156)

The world the entity stands in.

#### Returns

[`World`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/World/classes/World.md)

***

### hasStatusEffect()

> **hasStatusEffect**(`identifier`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:342](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L342)

Whether one status effect is active.

#### Parameters

##### identifier

`string`

#### Returns

`boolean`

***

### heal()

> **heal**(`amount`): `Promise`\<`boolean`\>

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:298](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L298)

Heals the entity in the store.

#### Parameters

##### amount

`number`

#### Returns

`Promise`\<`boolean`\>

***

### isAlive()

> **isAlive**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:258](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L258)

Whether the entity is still in the store and has health left.

#### Returns

`boolean`

***

### isAttackable()

> **isAttackable**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:266](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L266)

Whether a blow can land on the entity: one with health left, or a boat or minecart, which
has none and breaks from the damage blows add up to, as Java's `VehicleEntity` does.

#### Returns

`boolean`

***

### isOnGround()

> **isOnGround**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:223](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L223)

#### Returns

`boolean`

#### Inherit Doc

#### Implementation of

[`ShownActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#shownactor).[`isOnGround`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/ShownActor/index.md#isonground)

***

### isOnPortalCooldown()

> **isOnPortalCooldown**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:431](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L431)

Whether the entity still refuses portals after a recent dimension change.

#### Returns

`boolean`

***

### portalContact()

> **portalContact**(): [`PortalContact`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/PortalContact/classes/PortalContact.md) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:444](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L444)

The portal the entity is in contact with, if any.

#### Returns

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

***

### projectMetadata()

> **projectMetadata**(`leashHolderId?`): [`ActorMetadataProjection`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/actorMetadata/index.md#actormetadataprojection)

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:203](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L203)

The actor metadata the store state projects to, which [StoreActor.metadata](#metadata) writes.

#### Parameters

##### leashHolderId?

`number`

The runtime id of whatever holds the entity's leash.

#### Returns

[`ActorMetadataProjection`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/actorMetadata/index.md#actormetadataprojection)

***

### removeStatusEffect()

> **removeStatusEffect**(`identifier`, `notify?`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:380](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L380)

Removes one status effect.

#### Parameters

##### identifier

`string`

##### notify?

`boolean` = `true`

#### Returns

`boolean`

Whether an active effect was removed.

***

### removeTag()

> **removeTag**(`tag`): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:332](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L332)

Takes a `/tag` tag off.

#### Parameters

##### tag

`string`

#### Returns

`boolean`

Whether the entity carried it.

***

### setHealth()

> **setHealth**(`health`, `source?`): `Promise`\<`void`\>

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:290](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L290)

A health written onto the entity: a lower one, which is what `/kill` writes, is a blow for
the difference through the store's pipeline, and a higher one is a heal.

#### Parameters

##### health

`number`

##### source?

[`DamageCause`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/DamageCause/index.md#damagecause-1) \| [`DamageSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/DamageSource/classes/DamageSource.md) = `DamageCause.Generic`

#### Returns

`Promise`\<`void`\>

***

### setName()

> **setName**(`name`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:243](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L243)

Names the entity in the store, which shows it to clients.

#### Parameters

##### name

`string`

#### Returns

`void`

***

### setPortalCooldown()

> **setPortalCooldown**(`ticks?`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:426](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L426)

Starts the portal cooldown, on arrival through a portal.

#### Parameters

##### ticks?

`number` = `...`

#### Returns

`void`

***

### shouldPersist()

> **shouldPersist**(): `boolean`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:273](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L273)

Whether a save writes the entity, which Bedrock's `minecraft:transient` turns off.

#### Returns

`boolean`

***

### toString()

> **toString**(): `string`

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

The entity as `/debug` lists it.

#### Returns

`string`

***

### touchPortal()

> **touchPortal**(`at`, `portal?`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:452](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L452)

Records that the entity overlaps a portal block this tick: a touch on cooldown winds the
cooldown back instead of opening a contact.

#### Parameters

##### at

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

##### portal?

[`PortalBlockRef`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/portal/DimensionTravel/index.md#portalblockref)

#### Returns

`void`

***

### update()

> **update**(`tick`): `void`

Defined in: [packages/prismarine/src/entity/data/storeActors.ts:473](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storeActors.ts#L473)

The part of a tick the store does not run yet: the portal clock, the start of a trip
through a portal once the contact is ready, and the status effects, whose harm and healing go through the
store.

#### Parameters

##### tick

`number`

#### Returns

`void`
