[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / host/entities/world

# host/entities/world

## Interfaces

### ScriptAimAssistCategory

Defined in: [script-host/src/host/entities/world.ts:189](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L189)

One aim assist category: the priorities a player's aim assist gives what it targets.

#### Properties

##### blocks

> `readonly` **blocks**: `Readonly`\<`Record`\<`string`, `number`\>\>

Defined in: [script-host/src/host/entities/world.ts:193](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L193)

##### blockTags

> `readonly` **blockTags**: `Readonly`\<`Record`\<`string`, `number`\>\>

Defined in: [script-host/src/host/entities/world.ts:195](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L195)

##### defaultBlockPriority

> `readonly` **defaultBlockPriority**: `number`

Defined in: [script-host/src/host/entities/world.ts:191](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L191)

##### defaultEntityPriority

> `readonly` **defaultEntityPriority**: `number`

Defined in: [script-host/src/host/entities/world.ts:192](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L192)

##### entities

> `readonly` **entities**: `Readonly`\<`Record`\<`string`, `number`\>\>

Defined in: [script-host/src/host/entities/world.ts:194](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L194)

##### entityTypeFamilies

> `readonly` **entityTypeFamilies**: `Readonly`\<`Record`\<`string`, `number`\>\>

Defined in: [script-host/src/host/entities/world.ts:196](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L196)

##### identifier

> `readonly` **identifier**: `string`

Defined in: [script-host/src/host/entities/world.ts:190](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L190)

***

### ScriptAimAssistPreset

Defined in: [script-host/src/host/entities/world.ts:200](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L200)

One aim assist preset: what a player's aim assist ignores, and the category each held item uses.

#### Properties

##### defaultItemSettings?

> `readonly` `optional` **defaultItemSettings?**: `string`

Defined in: [script-host/src/host/entities/world.ts:202](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L202)

##### excludedBlocks

> `readonly` **excludedBlocks**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:204](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L204)

##### excludedBlockTags

> `readonly` **excludedBlockTags**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:206](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L206)

##### excludedEntities

> `readonly` **excludedEntities**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:205](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L205)

##### excludedEntityTypeFamilies

> `readonly` **excludedEntityTypeFamilies**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:207](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L207)

##### handSettings?

> `readonly` `optional` **handSettings?**: `string`

Defined in: [script-host/src/host/entities/world.ts:203](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L203)

##### identifier

> `readonly` **identifier**: `string`

Defined in: [script-host/src/host/entities/world.ts:201](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L201)

##### itemSettings

> `readonly` **itemSettings**: `Readonly`\<`Record`\<`string`, `string`\>\>

Defined in: [script-host/src/host/entities/world.ts:208](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L208)

##### liquidTargetingItems

> `readonly` **liquidTargetingItems**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:209](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L209)

***

### ScriptAimAssistRegistry

Defined in: [script-host/src/host/entities/world.ts:213](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L213)

The aim assist registry, in the order its entries were added.

#### Properties

##### categories

> `readonly` **categories**: readonly [`ScriptAimAssistCategory`](#scriptaimassistcategory)[]

Defined in: [script-host/src/host/entities/world.ts:214](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L214)

##### presets

> `readonly` **presets**: readonly [`ScriptAimAssistPreset`](#scriptaimassistpreset)[]

Defined in: [script-host/src/host/entities/world.ts:215](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L215)

***

### ScriptClientInfo

Defined in: [script-host/src/host/entities/world.ts:72](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L72)

What a player's client told the server about itself.

#### Properties

##### graphicsMode

> `readonly` **graphicsMode**: `"Deferred"` \| `"Fancy"` \| `"RayTraced"` \| `"Simple"`

Defined in: [script-host/src/host/entities/world.ts:76](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L76)

##### inputMode

> `readonly` **inputMode**: `"Gamepad"` \| `"KeyboardAndMouse"` \| `"MotionController"` \| `"Touch"`

Defined in: [script-host/src/host/entities/world.ts:77](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L77)

##### jump

> `readonly` **jump**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:81](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L81)

##### locale

> `readonly` **locale**: `string`

Defined in: [script-host/src/host/entities/world.ts:73](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L73)

##### maxRenderDistance

> `readonly` **maxRenderDistance**: `number`

Defined in: [script-host/src/host/entities/world.ts:74](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L74)

##### movement

> `readonly` **movement**: `object`

Defined in: [script-host/src/host/entities/world.ts:80](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L80)

The movement input this tick, `x` sideways and `y` forward, each from -1 to 1.

###### x

> `readonly` **x**: `number`

###### y

> `readonly` **y**: `number`

##### persistentId

> `readonly` **persistentId**: `string`

Defined in: [script-host/src/host/entities/world.ts:88](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L88)

An id that stays the player's across sessions.

##### ping?

> `readonly` `optional` **ping?**: `number`

Defined in: [script-host/src/host/entities/world.ts:84](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L84)

The round trip to the client, in milliseconds. Absent for a player with no client, such as a simulated one.

##### platformType

> `readonly` **platformType**: `"Console"` \| `"Desktop"` \| `"Mobile"`

Defined in: [script-host/src/host/entities/world.ts:75](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L75)

##### sneak

> `readonly` **sneak**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:82](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L82)

##### splitScreenSlot?

> `readonly` `optional` **splitScreenSlot?**: `"First"` \| `"Fourth"` \| `"Second"` \| `"Third"`

Defined in: [script-host/src/host/entities/world.ts:86](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L86)

Absent for a player with no client.

##### touchOnlyAffectsHotbar

> `readonly` **touchOnlyAffectsHotbar**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:78](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L78)

***

### ScriptDimensionLocation

Defined in: [script-host/src/host/entities/world.ts:92](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L92)

A point in a dimension.

#### Extends

- [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

#### Properties

##### dimension

> `readonly` **dimension**: `string`

Defined in: [script-host/src/host/entities/world.ts:93](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L93)

##### x

> `readonly` **x**: `number`

Defined in: [script-host/src/host/world.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/world.ts#L56)

###### Inherited from

[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3).[`x`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#x-2)

##### y

> `readonly` **y**: `number`

Defined in: [script-host/src/host/world.ts:57](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/world.ts#L57)

###### Inherited from

[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3).[`y`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#y-2)

##### z

> `readonly` **z**: `number`

Defined in: [script-host/src/host/world.ts:58](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/world.ts#L58)

###### Inherited from

[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3).[`z`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#z-1)

***

### ScriptEntityProperty

Defined in: [script-host/src/host/entities/world.ts:54](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L54)

An entity property's definition and its value now.

#### Properties

##### defaultValue

> `readonly` **defaultValue**: `string` \| `number` \| `boolean`

Defined in: [script-host/src/host/entities/world.ts:57](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L57)

##### range?

> `readonly` `optional` **range?**: readonly \[`number`, `number`\]

Defined in: [script-host/src/host/entities/world.ts:59](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L59)

An `int` or `float` property's bounds.

##### type

> `readonly` **type**: `"float"` \| `"enum"` \| `"int"` \| `"bool"`

Defined in: [script-host/src/host/entities/world.ts:55](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L55)

##### value

> `readonly` **value**: `string` \| `number` \| `boolean`

Defined in: [script-host/src/host/entities/world.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L56)

##### values?

> `readonly` `optional` **values?**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:61](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L61)

An `enum` property's values.

***

### ScriptEntityStatus

Defined in: [script-host/src/host/entities/world.ts:20](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L20)

An entity's motion and the states a script reads of it, read in one call.

#### Properties

##### box

> `readonly` **box**: `object`

Defined in: [script-host/src/host/entities/world.ts:33](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L33)

Its collision box.

###### max

> `readonly` **max**: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

###### min

> `readonly` **min**: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

##### climbing

> `readonly` **climbing**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:26](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L26)

Whether it is on a ladder, a vine or another block it climbs.

##### emoting?

> `readonly` `optional` **emoting?**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:50](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L50)

##### fireTicks

> `readonly` **fireTicks**: `number`

Defined in: [script-host/src/host/entities/world.ts:31](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L31)

How many ticks it burns for; 0 when it is not on fire.

##### flying?

> `readonly` `optional` **flying?**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:47](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L47)

A player's flight, glide, jump and emote. Absent reads as false.

##### gliding?

> `readonly` `optional` **gliding?**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:48](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L48)

##### inWater

> `readonly` **inWater**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:24](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L24)

##### jumping?

> `readonly` `optional` **jumping?**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:49](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L49)

##### leashHolder?

> `readonly` `optional` **leashHolder?**: `string`

Defined in: [script-host/src/host/entities/world.ts:41](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L41)

The entity that holds its leash, by id.

##### onGround

> `readonly` **onGround**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:23](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L23)

##### owner?

> `readonly` `optional` **owner?**: `string`

Defined in: [script-host/src/host/entities/world.ts:43](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L43)

The player it is tamed to, by id. Absent for a wild or ownerless entity.

##### riders

> `readonly` **riders**: readonly `string`[]

Defined in: [script-host/src/host/entities/world.ts:39](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L39)

The entities that ride it, by id, in the order they took their seats.

##### sleeping

> `readonly` **sleeping**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:27](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L27)

##### sprinting

> `readonly` **sprinting**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:28](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L28)

##### swimming

> `readonly` **swimming**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:29](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L29)

##### tamed

> `readonly` **tamed**: `boolean`

Defined in: [script-host/src/host/entities/world.ts:45](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L45)

Whether it is tamed, which a horse can be without an owner.

##### target?

> `readonly` `optional` **target?**: `string`

Defined in: [script-host/src/host/entities/world.ts:35](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L35)

The entity it is attacking, by id. Absent when it attacks none.

##### vehicle?

> `readonly` `optional` **vehicle?**: `string`

Defined in: [script-host/src/host/entities/world.ts:37](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L37)

The entity it rides, by id.

##### velocity

> `readonly` **velocity**: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

Defined in: [script-host/src/host/entities/world.ts:22](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L22)

Its velocity, in blocks per tick.

***

### ScriptEntitySystems

Defined in: [script-host/src/host/entities/world.ts:219](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L219)

The entity and player systems a script reaches. A world without them has none of these members' behavior.

#### Methods

##### addAimAssist()

> **addAimAssist**(`added`): `void`

Defined in: [script-host/src/host/entities/world.ts:304](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L304)

Adds categories and presets a script registered, for the clients now in the world and those who join later.

###### Parameters

###### added

[`ScriptAimAssistRegistry`](#scriptaimassistregistry)

###### Returns

`void`

##### aimAssist()

> **aimAssist**(): [`ScriptAimAssistRegistry`](#scriptaimassistregistry)

Defined in: [script-host/src/host/entities/world.ts:302](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L302)

The vanilla aim assist registry the world's clients are sent when they join.

###### Returns

[`ScriptAimAssistRegistry`](#scriptaimassistregistry)

##### applyImpulse()

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

Defined in: [script-host/src/host/entities/world.ts:244](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L244)

Adds to an entity's velocity.

###### Parameters

###### id

`string`

###### impulse

[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

###### Returns

`void`

##### applyKnockback()

> **applyKnockback**(`id`, `horizontal`, `vertical`): `void`

Defined in: [script-host/src/host/entities/world.ts:247](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L247)

Pushes an entity along a horizontal vector, whose length is the strength, and up by `vertical`.

###### Parameters

###### id

`string`

###### horizontal

###### x

`number`

###### z

`number`

###### vertical

`number`

###### Returns

`void`

##### clearVelocity()

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

Defined in: [script-host/src/host/entities/world.ts:245](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L245)

###### Parameters

###### id

`string`

###### Returns

`void`

##### clientInfo()

> **clientInfo**(`id`): [`ScriptClientInfo`](#scriptclientinfo) \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:287](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L287)

What a player's client told the server about itself, or undefined for a player who is gone.

###### Parameters

###### id

`string`

###### Returns

[`ScriptClientInfo`](#scriptclientinfo) \| `undefined`

##### components()

> **components**(`id`): `ReadonlyMap`\<`string`, `unknown`\> \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:225](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L225)

The components active on an entity now, by id, each with its JSON as its definition writes
it: the base components, then each active component group's, later ones replacing earlier.

###### Parameters

###### id

`string`

###### Returns

`ReadonlyMap`\<`string`, `unknown`\> \| `undefined`

Undefined for an entity that is gone.

##### dismount()

> **dismount**(`rider`): `void`

Defined in: [script-host/src/host/entities/world.ts:262](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L262)

Takes a rider off whatever it rides.

###### Parameters

###### rider

`string`

###### Returns

`void`

##### eat()

> **eat**(`id`, `typeId`): `void`

Defined in: [script-host/src/host/entities/world.ts:300](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L300)

Applies a food's effect on a player, as eating it does.

###### Parameters

###### id

`string`

###### typeId

`string`

###### Returns

`void`

##### enderChest()

> **enderChest**(`id`): readonly ([`ScriptItem`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptitem) \| `null`)[] \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:306](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L306)

A player's ender chest, or undefined for one that is gone.

###### Parameters

###### id

`string`

###### Returns

readonly ([`ScriptItem`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptitem) \| `null`)[] \| `undefined`

##### entityTypes()

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

Defined in: [script-host/src/host/entities/world.ts:275](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L275)

Every entity type the world can spawn, by id.

###### Returns

readonly `string`[]

##### experience()

> **experience**(`id`): [`ScriptExperience`](#scriptexperience) \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:277](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L277)

A player's experience, or undefined for one that is gone.

###### Parameters

###### id

`string`

###### Returns

[`ScriptExperience`](#scriptexperience) \| `undefined`

##### extinguishFire()

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

Defined in: [script-host/src/host/entities/world.ts:255](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L255)

Puts an entity's fire out, and returns whether it had any.

###### Parameters

###### id

`string`

###### Returns

`boolean`

##### formatVersion()

> **formatVersion**(`id`): `string` \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:231](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L231)

The `format_version` of the file that defines an entity's type, such as `1.26.50`. BDS reads
an item name without a namespace as written from a file of 1.26.60 or later, and with
`minecraft:` from an older one.

###### Parameters

###### id

`string`

###### Returns

`string` \| `undefined`

##### itemIdentifier()

> **itemIdentifier**(`name`): `string`

Defined in: [script-host/src/host/entities/world.ts:273](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L273)

The item type an item name in an entity's definition names, with a legacy name such as `minecraft:fish` read as its type now.

###### Parameters

###### name

`string`

###### Returns

`string`

##### leash()

> **leash**(`id`, `holder`): `void`

Defined in: [script-host/src/host/entities/world.ts:264](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L264)

Ties an entity's leash to a holder, or unties it with none.

###### Parameters

###### id

`string`

###### holder

`string` \| `undefined`

###### Returns

`void`

##### permissions()

> **permissions**(`id`): [`ScriptPermissionLevels`](#scriptpermissionlevels) \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:282](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L282)

###### Parameters

###### id

`string`

###### Returns

[`ScriptPermissionLevels`](#scriptpermissionlevels) \| `undefined`

##### playAnimation()

> **playAnimation**(`id`, `animation`): `void`

Defined in: [script-host/src/host/entities/world.ts:289](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L289)

Plays an animation on an entity for the clients that see it.

###### Parameters

###### id

`string`

###### animation

###### blendOutTime?

`number`

###### controller?

`string`

###### name

`string`

###### nextState?

`string`

###### stopExpression?

`string`

###### Returns

`void`

##### properties()

> **properties**(`id`): `ReadonlyMap`\<`string`, [`ScriptEntityProperty`](#scriptentityproperty)\> \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:240](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L240)

An entity's properties, by id, or undefined for one that is gone.

###### Parameters

###### id

`string`

###### Returns

`ReadonlyMap`\<`string`, [`ScriptEntityProperty`](#scriptentityproperty)\> \| `undefined`

##### ride()

> **ride**(`rider`, `vehicle`): `boolean`

Defined in: [script-host/src/host/entities/world.ts:260](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L260)

Seats a rider on a vehicle.

###### Parameters

###### rider

`string`

###### vehicle

`string`

###### Returns

`boolean`

False when the vehicle has no room or does not take the rider's family.

##### sendClient()

> **sendClient**(`id`, `message`): `void`

Defined in: [script-host/src/host/entities/world.ts:285](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L285)

Sends a player's client a message.

###### Parameters

###### id

`string`

###### message

[`ScriptClientMessage`](#scriptclientmessage)

###### Returns

`void`

##### setCommandPermissionLevel()

> **setCommandPermissionLevel**(`id`, `level`): `void`

Defined in: [script-host/src/host/entities/world.ts:283](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L283)

###### Parameters

###### id

`string`

###### level

`number`

###### Returns

`void`

##### setComponentField()

> **setComponentField**(`id`, `component`, `field`, `value`): `void`

Defined in: [script-host/src/host/entities/world.ts:271](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L271)

Writes a script-set field of a component, such as a sheep's `color`, an NPC's `name` or a projectile's `gravity`.

###### Parameters

###### id

`string`

###### component

`string`

###### field

`string`

###### value

`unknown`

###### Returns

`void`

##### setEnderChestItem()

> **setEnderChestItem**(`id`, `slot`, `item`): `void`

Defined in: [script-host/src/host/entities/world.ts:307](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L307)

###### Parameters

###### id

`string`

###### slot

`number`

###### item

[`ScriptItem`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptitem) \| `undefined`

###### Returns

`void`

##### setExperience()

> **setExperience**(`id`, `experience`): `void`

Defined in: [script-host/src/host/entities/world.ts:278](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L278)

###### Parameters

###### id

`string`

###### experience

[`ScriptExperience`](#scriptexperience)

###### Returns

`void`

##### setOnFire()

> **setOnFire**(`id`, `ticks`): `boolean`

Defined in: [script-host/src/host/entities/world.ts:253](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L253)

Sets an entity on fire for a number of ticks.

###### Parameters

###### id

`string`

###### ticks

`number`

###### Returns

`boolean`

False for an entity that cannot burn.

##### setProperty()

> **setProperty**(`id`, `name`, `value`): `void`

Defined in: [script-host/src/host/entities/world.ts:242](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L242)

Writes a property's value, which the caller checked against its definition.

###### Parameters

###### id

`string`

###### name

`string`

###### value

`string` \| `number` \| `boolean`

###### Returns

`void`

##### setRotation()

> **setRotation**(`id`, `rotation`): `void`

Defined in: [script-host/src/host/entities/world.ts:248](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L248)

###### Parameters

###### id

`string`

###### rotation

[`ScriptRotation`](#scriptrotation)

###### Returns

`void`

##### setSpawnPoint()

> **setSpawnPoint**(`id`, `point`): `void`

Defined in: [script-host/src/host/entities/world.ts:281](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L281)

###### Parameters

###### id

`string`

###### point

[`ScriptDimensionLocation`](#scriptdimensionlocation) \| `undefined`

###### Returns

`void`

##### spawnPoint()

> **spawnPoint**(`id`): [`ScriptDimensionLocation`](#scriptdimensionlocation) \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:280](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L280)

Where a player respawns; undefined for the world's spawn.

###### Parameters

###### id

`string`

###### Returns

[`ScriptDimensionLocation`](#scriptdimensionlocation) \| `undefined`

##### status()

> **status**(`id`): [`ScriptEntityStatus`](#scriptentitystatus) \| `undefined`

Defined in: [script-host/src/host/entities/world.ts:233](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L233)

The entity's motion and state, or undefined for one that is gone.

###### Parameters

###### id

`string`

###### Returns

[`ScriptEntityStatus`](#scriptentitystatus) \| `undefined`

##### tame()

> **tame**(`id`, `player`): `boolean`

Defined in: [script-host/src/host/entities/world.ts:269](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L269)

Tames an entity, to a player when one is given.

###### Parameters

###### id

`string`

###### player

`string` \| `undefined`

###### Returns

`boolean`

False for an entity that cannot be tamed or already is.

##### triggerEvent()

> **triggerEvent**(`id`, `event`): `boolean`

Defined in: [script-host/src/host/entities/world.ts:238](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L238)

Runs one of an entity's definition events.

###### Parameters

###### id

`string`

###### event

`string`

###### Returns

`boolean`

False when its definition has no such event.

***

### ScriptExperience

Defined in: [script-host/src/host/entities/world.ts:65](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L65)

A player's experience, as Bedrock keeps it: whole levels and how far along the next one the bar is.

#### Properties

##### level

> `readonly` **level**: `number`

Defined in: [script-host/src/host/entities/world.ts:66](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L66)

##### progress

> `readonly` **progress**: `number`

Defined in: [script-host/src/host/entities/world.ts:68](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L68)

From 0 to 1.

***

### ScriptPermissionLevels

Defined in: [script-host/src/host/entities/world.ts:97](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L97)

A player's permission levels, by their numbers in `CommandPermissionLevel` and `PlayerPermissionLevel`.

#### Properties

##### command

> `readonly` **command**: `number`

Defined in: [script-host/src/host/entities/world.ts:98](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L98)

##### player

> `readonly` **player**: `number`

Defined in: [script-host/src/host/entities/world.ts:99](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L99)

***

### ScriptRotation

Defined in: [script-host/src/host/entities/world.ts:14](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L14)

A rotation in degrees: `x` the pitch, `y` the yaw.

#### Properties

##### x

> `readonly` **x**: `number`

Defined in: [script-host/src/host/entities/world.ts:15](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L15)

##### y

> `readonly` **y**: `number`

Defined in: [script-host/src/host/entities/world.ts:16](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L16)

***

### ScriptSplineKeyFrame

Defined in: [script-host/src/host/entities/world.ts:137](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L137)

One key frame of a camera spline: a value the camera reaches at a time, eased there as `EasingType` names.

#### Type Parameters

##### Value

`Value`

#### Properties

##### easing?

> `readonly` `optional` **easing?**: `string`

Defined in: [script-host/src/host/entities/world.ts:141](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L141)

An `EasingType` name, such as `InOutSine`; absent for linear.

##### time

> `readonly` **time**: `number`

Defined in: [script-host/src/host/entities/world.ts:139](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L139)

##### value

> `readonly` **value**: `Value`

Defined in: [script-host/src/host/entities/world.ts:138](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L138)

## Type Aliases

### ScriptCameraInstruction

> **ScriptCameraInstruction** = \{ `ease?`: \{ `time`: `number`; `type`: `string`; \}; `facing?`: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3); `facingEntity?`: `string`; `isDefault?`: `boolean`; `kind`: `"set"`; `location?`: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3); `preset`: `string`; `rotation?`: [`ScriptRotation`](#scriptrotation); \} \| \{ `kind`: `"clear"`; \} \| \{ `color?`: \{ `blue`: `number`; `green`: `number`; `red`: `number`; \}; `kind`: `"fade"`; `time?`: \{ `fadeIn`: `number`; `fadeOut`: `number`; `hold`: `number`; \}; \} \| \{ `ease?`: \{ `time`: `number`; `type`: `string`; \}; `fov`: `number`; `kind`: `"fov"`; \} \| \{ `entity?`: `string`; `kind`: `"attach"`; \} \| \{ `kind`: `"detach"`; \} \| \{ `controlPoints`: readonly [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)[]; `kind`: `"spline"`; `progressKeyFrames`: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<`number`\>[]; `rotationKeyFrames`: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)\>[]; `totalTime`: `number`; `type`: `"catmullRom"` \| `"linear"`; \}

Defined in: [script-host/src/host/entities/world.ts:103](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L103)

A camera instruction a script sends a player, as `Camera`'s members describe it.

#### Union Members

##### Type Literal

\{ `ease?`: \{ `time`: `number`; `type`: `string`; \}; `facing?`: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3); `facingEntity?`: `string`; `isDefault?`: `boolean`; `kind`: `"set"`; `location?`: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3); `preset`: `string`; `rotation?`: [`ScriptRotation`](#scriptrotation); \}

###### ease?

> `readonly` `optional` **ease?**: `object`

###### ease.time

> `readonly` **time**: `number`

###### ease.type

> `readonly` **type**: `string`

###### facing?

> `readonly` `optional` **facing?**: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

###### facingEntity?

> `readonly` `optional` **facingEntity?**: `string`

###### isDefault?

> `readonly` `optional` **isDefault?**: `boolean`

Whether the preset becomes the player's default camera.

###### kind

> `readonly` **kind**: `"set"`

###### location?

> `readonly` `optional` **location?**: [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)

###### preset

> `readonly` **preset**: `string`

The preset's id, such as `minecraft:free`.

###### rotation?

> `readonly` `optional` **rotation?**: [`ScriptRotation`](#scriptrotation)

***

##### Type Literal

\{ `kind`: `"clear"`; \}

***

##### Type Literal

\{ `color?`: \{ `blue`: `number`; `green`: `number`; `red`: `number`; \}; `kind`: `"fade"`; `time?`: \{ `fadeIn`: `number`; `fadeOut`: `number`; `hold`: `number`; \}; \}

***

##### Type Literal

\{ `ease?`: \{ `time`: `number`; `type`: `string`; \}; `fov`: `number`; `kind`: `"fov"`; \}

***

##### Type Literal

\{ `entity?`: `string`; `kind`: `"attach"`; \}

***

##### Type Literal

\{ `kind`: `"detach"`; \}

***

##### Type Literal

\{ `controlPoints`: readonly [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)[]; `kind`: `"spline"`; `progressKeyFrames`: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<`number`\>[]; `rotationKeyFrames`: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)\>[]; `totalTime`: `number`; `type`: `"catmullRom"` \| `"linear"`; \}

###### controlPoints

> `readonly` **controlPoints**: readonly [`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)[]

###### kind

> `readonly` **kind**: `"spline"`

A camera path `Camera.playAnimation` plays.

###### progressKeyFrames

> `readonly` **progressKeyFrames**: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<`number`\>[]

How far along the path the camera is at each time, `alpha` from 0 to 1.

###### rotationKeyFrames

> `readonly` **rotationKeyFrames**: readonly [`ScriptSplineKeyFrame`](#scriptsplinekeyframe)\<[`ScriptVector3`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/world/index.md#scriptvector3)\>[]

###### totalTime

> `readonly` **totalTime**: `number`

###### type

> `readonly` **type**: `"catmullRom"` \| `"linear"`

***

### ScriptClientMessage

> **ScriptClientMessage** = \{ `instruction`: [`ScriptCameraInstruction`](#scriptcamerainstruction); `kind`: `"camera"`; \} \| \{ `intensity`: `number`; `kind`: `"shake"`; `seconds`: `number`; `type`: `"positional"` \| `"rotational"`; \} \| \{ `kind`: `"stopShake"`; \} \| \{ `hidden`: readonly `number`[]; `kind`: `"hud"`; `visible`: readonly `number`[]; \} \| \{ `kind`: `"inputLocks"`; `locked`: readonly `number`[]; \} \| \{ `category`: `string`; `kind`: `"cooldown"`; `ticks`: `number`; \} \| \{ `kind`: `"controlScheme"`; `scheme`: `string`; \} \| \{ `kind`: `"stopSound"`; `sound?`: `string`; \} \| \{ `action`: `"play"` \| `"queue"` \| `"stop"`; `fade?`: `number`; `kind`: `"music"`; `loop?`: `boolean`; `track?`: `string`; `volume?`: `number`; \} \| \{ `distance`: `number`; `kind`: `"aimAssist"`; `preset?`: `string`; `targetMode`: `"Angle"` \| `"Distance"`; `viewAngle`: \{ `x`: `number`; `y`: `number`; \}; \} \| \{ `entity`: `string`; `kind`: `"propertyOverride"`; `property`: `string`; `value?`: `number` \| `boolean` \| `string`; \} \| \{ `id`: `string`; `kind`: `"scriptMessage"`; `value`: `string`; \}

Defined in: [script-host/src/host/entities/world.ts:145](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/entities/world.ts#L145)

What a script sends a player's client.

#### Union Members

##### Type Literal

\{ `instruction`: [`ScriptCameraInstruction`](#scriptcamerainstruction); `kind`: `"camera"`; \}

***

##### Type Literal

\{ `intensity`: `number`; `kind`: `"shake"`; `seconds`: `number`; `type`: `"positional"` \| `"rotational"`; \}

***

##### Type Literal

\{ `kind`: `"stopShake"`; \}

***

##### Type Literal

\{ `hidden`: readonly `number`[]; `kind`: `"hud"`; `visible`: readonly `number`[]; \}

The HUD elements a script hid, by their numbers in `HudElement`, all of them sent each time.

***

##### Type Literal

\{ `kind`: `"inputLocks"`; `locked`: readonly `number`[]; \}

The input a script locked, as `InputPermissionCategory` numbers.

***

##### Type Literal

\{ `category`: `string`; `kind`: `"cooldown"`; `ticks`: `number`; \}

***

##### Type Literal

\{ `kind`: `"controlScheme"`; `scheme`: `string`; \}

***

##### Type Literal

\{ `kind`: `"stopSound"`; `sound?`: `string`; \}

***

##### Type Literal

\{ `action`: `"play"` \| `"queue"` \| `"stop"`; `fade?`: `number`; `kind`: `"music"`; `loop?`: `boolean`; `track?`: `string`; `volume?`: `number`; \}

***

##### Type Literal

\{ `distance`: `number`; `kind`: `"aimAssist"`; `preset?`: `string`; `targetMode`: `"Angle"` \| `"Distance"`; `viewAngle`: \{ `x`: `number`; `y`: `number`; \}; \}

###### distance

> `readonly` **distance**: `number`

###### kind

> `readonly` **kind**: `"aimAssist"`

###### preset?

> `readonly` `optional` **preset?**: `string`

Absent turns aim assist off.

###### targetMode

> `readonly` **targetMode**: `"Angle"` \| `"Distance"`

###### viewAngle

> `readonly` **viewAngle**: `object`

###### viewAngle.x

> `readonly` **x**: `number`

###### viewAngle.y

> `readonly` **y**: `number`

***

##### Type Literal

\{ `entity`: `string`; `kind`: `"propertyOverride"`; `property`: `string`; `value?`: `number` \| `boolean` \| `string`; \}

###### entity

> `readonly` **entity**: `string`

###### kind

> `readonly` **kind**: `"propertyOverride"`

###### property

> `readonly` **property**: `string`

Empty when every override of the entity is cleared.

###### value?

> `readonly` `optional` **value?**: `number` \| `boolean` \| `string`

Absent when the property's override is removed.

***

##### Type Literal

\{ `id`: `string`; `kind`: `"scriptMessage"`; `value`: `string`; \}

A message to the client's data-driven UI, as `Player.postClientMessage` posts it.
