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

# host/world

## Interfaces

### BlockBreakIntent

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

A block a player is about to break, which a script's before-event sees before the world does.

#### Properties

##### block

> `readonly` **block**: [`ScriptBlockLocation`](#scriptblocklocation)

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

##### item?

> `readonly` `optional` **item?**: [`ScriptItem`](#scriptitem)

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

The stack in the player's hand. Absent for an empty hand.

##### player

> `readonly` **player**: `string`

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

The id of the player breaking it, as [ScriptWorld.players](#players) lists it.

***

### BlockInteractIntent

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

A block a player clicks, which a script's before-event sees before the click does anything.

#### Properties

##### block

> `readonly` **block**: [`ScriptBlockLocation`](#scriptblocklocation)

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

##### face

> `readonly` **face**: [`ScriptDirection`](#scriptdirection)

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

##### faceLocation

> `readonly` **faceLocation**: [`ScriptVector3`](#scriptvector3)

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

Where on the face the click landed, from the block's lowest corner.

##### item?

> `readonly` `optional` **item?**: [`ScriptItem`](#scriptitem)

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

The stack in the player's hand. Absent for an empty hand.

##### player

> `readonly` **player**: `string`

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

The id of the player clicking, as [ScriptWorld.players](#players) lists it.

***

### ChatSendIntent

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

A line of chat a player typed, which a script's before-event sees before anyone gets it.

#### Properties

##### message

> `readonly` **message**: `string`

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

##### sender

> `readonly` **sender**: `string`

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

The id of the player who typed it, as [ScriptWorld.players](#players) lists it.

***

### DataDrivenPathValue

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

One path of a data store property and its new value, such as `layout[7].value`.

#### Properties

##### path

> `readonly` **path**: `string`

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

##### value

> `readonly` **value**: [`DataDrivenLeaf`](#datadrivenleaf)

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

***

### DataDrivenRecord

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

A map in a data-driven screen's data store property, by key.

#### Indexable

> \[`key`: `string`\]: [`DataDrivenValue`](#datadrivenvalue)

***

### DataDrivenScreen

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

A `CustomForm` or `MessageBox` as BDS sends it: one property of the client's `minecraft` data
store, and the screen that reads it.

#### Properties

##### instance

> `readonly` **instance**: `number`

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

The number the property name ends in, which the client is told as the data instance id.

##### property

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

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

The property's name, such as `custom_form_data_3`, which the client's writes name too.

##### screenId

> `readonly` **screenId**: `string`

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

The screen to open: `minecraft:custom_form` or `minecraft:message_box`.

##### updates

> `readonly` **updates**: readonly [`DataDrivenPathValue`](#datadrivenpathvalue)[]

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

Paths to update after the property is set and before the screen opens, as BDS sends them.

##### value

> `readonly` **value**: [`DataDrivenRecord`](#datadrivenrecord)

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

The property's value.

***

### EntityInteractIntent

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

An entity a player clicks, which a script's before-event sees before the click does anything.

#### Properties

##### item?

> `readonly` `optional` **item?**: [`ScriptItem`](#scriptitem)

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

The stack in the player's hand. Absent for an empty hand.

##### player

> `readonly` **player**: `string`

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

The id of the player clicking, as [ScriptWorld.players](#players) lists it.

##### target

> `readonly` **target**: [`ScriptEntityRef`](#scriptentityref)

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

***

### ItemUseIntent

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

An item a player is about to use, which a script's before-event sees before the item acts.

#### Properties

##### item

> `readonly` **item**: [`ScriptItem`](#scriptitem)

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

##### player

> `readonly` **player**: `string`

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

The id of the player using it, as [ScriptWorld.players](#players) lists it.

***

### ScriptAdminServer

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

The dedicated server `@minecraft/server-admin`'s `dedicatedServer` and its functions reach,
which is the server's, not one world's.

#### Properties

##### allowList

> `readonly` **allowList**: [`ScriptAllowList`](#scriptallowlist)

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

#### Methods

##### isOperator()

> **isOperator**(`player`): `boolean`

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

Whether a player in the world is an operator, by their id.

###### Parameters

###### player

`string`

###### Returns

`boolean`

##### kick()

> **kick**(`player`, `reason`): `void`

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

Disconnects a player, with the reason their client shows.

###### Parameters

###### player

`string`

###### reason

`string` \| `undefined`

###### Returns

`void`

##### reloadPermissions()

> **reloadPermissions**(): `void`

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

Reads the server's permission files again.

###### Returns

`void`

##### setOperator()

> **setOperator**(`player`, `operator`): `void`

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

Makes a player an operator, or stops them being one.

###### Parameters

###### player

`string`

###### operator

`boolean`

###### Returns

`void`

##### stopServer()

> **stopServer**(): `void`

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

Stops the server, as `/stop` does, once the script that asked has returned.

###### Returns

`void`

***

### ScriptAllowList

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

The server's allow list, which `dedicatedServer.allowList` reads and writes.

#### Methods

##### add()

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

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

Adds a player, unless the list has them already.

###### Parameters

###### entry

[`ScriptAllowListEntry`](#scriptallowlistentry)

###### Returns

`void`

##### clear()

> **clear**(): `void`

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

###### Returns

`void`

##### contains()

> **contains**(`player`): `boolean`

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

###### Parameters

###### player

[`ScriptAllowListPlayer`](#scriptallowlistplayer)

###### Returns

`boolean`

##### enabled()

> **enabled**(): `boolean`

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

###### Returns

`boolean`

##### entries()

> **entries**(): readonly [`ScriptAllowListEntry`](#scriptallowlistentry)[]

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

###### Returns

readonly [`ScriptAllowListEntry`](#scriptallowlistentry)[]

##### playerOf()

> **playerOf**(`player`): [`ScriptAllowListPlayer`](#scriptallowlistplayer) \| `undefined`

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

The name and xuid of a player in the world, by their id, which a `Player` argument names.

###### Parameters

###### player

`string`

###### Returns

[`ScriptAllowListPlayer`](#scriptallowlistplayer) \| `undefined`

##### reload()

> **reload**(): `void`

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

Reads the list's file again.

###### Returns

`void`

##### remove()

> **remove**(`player`): `boolean`

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

###### Parameters

###### player

[`ScriptAllowListPlayer`](#scriptallowlistplayer)

###### Returns

`boolean`

Whether the player was on the list.

##### setEnabled()

> **setEnabled**(`enabled`): `void`

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

###### Parameters

###### enabled

`boolean`

###### Returns

`void`

***

### ScriptAllowListEntry

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

One player on the server's allow list, by name, xuid or both.

#### Properties

##### ignoresPlayerLimit

> `readonly` **ignoresPlayerLimit**: `boolean`

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

##### name?

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

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

##### xuid?

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

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

***

### ScriptAllowListPlayer

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

Who an allow list lookup names: a name, a xuid, or both.

#### Properties

##### name?

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

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

##### xuid?

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

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

***

### ScriptAttribute

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

An entity's attribute, such as its health, as an attribute component reads it.

#### Properties

##### current

> `readonly` **current**: `number`

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

##### default

> `readonly` **default**: `number`

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

The value the entity's type gives it, which `resetToDefaultValue` returns to.

##### max

> `readonly` **max**: `number`

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

##### min

> `readonly` **min**: `number`

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

***

### ScriptBlockLocation

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

A block position in a dimension.

#### Extends

- [`ScriptVector3`](#scriptvector3)

#### Properties

##### dimension

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

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

##### 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`](#scriptvector3).[`x`](#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`](#scriptvector3).[`y`](#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`](#scriptvector3).[`z`](#z-1)

***

### ScriptBlockPermutation

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

A block's type and the value of each of its states, as the Script API's `BlockPermutation` holds them.

#### Properties

##### states

> `readonly` **states**: `Readonly`\<`Record`\<`string`, `string` \| `number` \| `boolean`\>\>

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

##### typeId

> `readonly` **typeId**: `string`

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

***

### ScriptBlockTypeInfo

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

A block type as the Script API describes it.

#### Properties

##### air

> `readonly` **air**: `boolean`

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

##### components

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

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

The components a block of the type has, by id.

##### item

> `readonly` **item**: `string` \| `null`

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

The item a block of the type gives, or null for none.

##### liquid

> `readonly` **liquid**: `boolean`

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

##### liquidFlowStops?

> `readonly` `optional` **liquidFlowStops?**: readonly `object`[]

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

The permutations that stop water flowing in from some directions, each with the sides it
closes, as `Block.liquidCanFlowFromDirection` answers. Absent or empty when every
permutation lets water in from every side.

##### localizationKey

> `readonly` **localizationKey**: `string`

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

##### mapColor?

> `readonly` `optional` **mapColor?**: [`ScriptRgba`](#scriptrgba)

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

The color a block of the type shows on a map, as `Block.getMapColor` answers in the capture's biome.

##### mapColorComponent?

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

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

###### color

> `readonly` **color**: [`ScriptRgba`](#scriptrgba)

###### tintedColor

> `readonly` **tintedColor**: [`ScriptRgba`](#scriptrgba)

###### tintMethod

> `readonly` **tintMethod**: `string`

##### movable?

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

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

###### movementType

> `readonly` **movementType**: `string`

###### stickyType

> `readonly` **stickyType**: `string`

##### precipitation?

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

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

###### accumulatesSnow

> `readonly` **accumulatesSnow**: `boolean`

###### isSnowLoggable

> `readonly` **isSnowLoggable**: `boolean`

###### obstructsRain

> `readonly` **obstructsRain**: `boolean`

##### solid

> `readonly` **solid**: `boolean`

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

Whether a block of the type is solid and stops movement, as `Block.isSolid` answers.

##### tags

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

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

##### vibration?

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

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

###### dampens

> `readonly` **dampens**: `boolean`

###### occludes

> `readonly` **occludes**: `boolean`

##### water

> `readonly` **water**: [`ScriptWaterAnswers`](#scriptwateranswers)

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

##### waterPermutations

> `readonly` **waterPermutations**: readonly `object`[]

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

The permutations whose water answers differ from the type's.

***

### ScriptBook

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

What a book holds: its pages, and once signed, its title and author.

#### Properties

##### author?

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

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

##### pages

> `readonly` **pages**: readonly [`ScriptBookPage`](#scriptbookpage)[]

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

##### title?

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

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

***

### ScriptCatalog

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

The game's block, item, enchantment and potion types as the Script API describes them, which
`BlockTypes`, `ItemTypes`, `EnchantmentTypes`, `Potions` and the type facts of blocks and stacks
read. Every list is in the order BDS lists it.

#### Methods

##### blockStates()

> **blockStates**(): readonly `object`[]

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

Every block state and the values the game declares for it.

###### Returns

readonly `object`[]

##### blockType()

> **blockType**(`typeId`): [`ScriptBlockTypeInfo`](#scriptblocktypeinfo) \| `undefined`

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

###### Parameters

###### typeId

`string`

###### Returns

[`ScriptBlockTypeInfo`](#scriptblocktypeinfo) \| `undefined`

##### blockTypes()

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

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

Every block type's id.

###### Returns

readonly `string`[]

##### enchantments()

> **enchantments**(): readonly [`ScriptEnchantmentInfo`](#scriptenchantmentinfo)[]

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

###### Returns

readonly [`ScriptEnchantmentInfo`](#scriptenchantmentinfo)[]

##### itemType()

> **itemType**(`typeId`): [`ScriptItemInfo`](#scriptiteminfo) \| `undefined`

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

###### Parameters

###### typeId

`string`

###### Returns

[`ScriptItemInfo`](#scriptiteminfo) \| `undefined`

##### itemTypes()

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

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

Every item type's id.

###### Returns

readonly `string`[]

##### potionDeliveries()

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

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

Every potion delivery, such as `Consume`.

###### Returns

readonly `string`[]

##### potionEffects()

> **potionEffects**(): readonly `object`[]

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

Every potion effect, and how long it lasts when it is timed.

###### Returns

readonly `object`[]

##### potionItem()

> **potionItem**(`effect`, `delivery`): \{ `data`: `number`; `typeId`: `string`; \} \| `undefined`

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

The item and data value a potion of an effect and a delivery is, or undefined when none is.

###### Parameters

###### effect

`string`

###### delivery

`string`

###### Returns

\{ `data`: `number`; `typeId`: `string`; \} \| `undefined`

##### potionOf()

> **potionOf**(`typeId`, `data`): \{ `delivery`: `string`; `effect`: `string`; \} \| `undefined`

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

The effect and delivery a potion item's data value holds, or undefined when it holds none.

###### Parameters

###### typeId

`string`

###### data

`number`

###### Returns

\{ `delivery`: `string`; `effect`: `string`; \} \| `undefined`

***

### ScriptCommandEnum

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

An enum a script registered for its commands' `Enum` parameters.

#### Properties

##### name

> `readonly` **name**: `string`

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

The name with its namespace, which a parameter names.

##### values

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

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

***

### ScriptCommandOrigin

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

Who ran a custom command, as `CustomCommandOrigin` reads it.

#### Properties

##### initiator?

> `readonly` `optional` **initiator?**: [`ScriptEntityRef`](#scriptentityref)

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

The player who talked to the NPC that ran it.

##### sourceEntity?

> `readonly` `optional` **sourceEntity?**: [`ScriptEntityRef`](#scriptentityref)

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

The entity the command runs as, absent for the server.

##### sourceType

> `readonly` **sourceType**: [`ScriptEventSourceType`](#scripteventsourcetype)

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

***

### ScriptCommandOutcome

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

What a custom command's callback answered, which the world tells the sender.

#### Properties

##### message?

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

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

The message the sender is shown. Absent when the callback gave none.

##### status

> `readonly` **status**: `"success"` \| `"failure"`

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

***

### ScriptCommandParameter

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

One parameter of a custom command.

#### Properties

##### enumName?

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

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

The registered enum an `Enum` parameter takes its values from.

##### name

> `readonly` **name**: `string`

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

##### type

> `readonly` **type**: [`ScriptCommandParamType`](#scriptcommandparamtype)

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

***

### ScriptCommandSet

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

The custom commands the scripts registered in `startup`, and the way to run one.

#### Properties

##### commands

> `readonly` **commands**: readonly [`ScriptCustomCommand`](#scriptcustomcommand)[]

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

##### enums

> `readonly` **enums**: readonly [`ScriptCommandEnum`](#scriptcommandenum)[]

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

#### Methods

##### run()

> **run**(`name`, `origin`, `args`): [`ScriptCommandOutcome`](#scriptcommandoutcome)

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

Runs a command's callback, in restricted execution, while the command runs.

###### Parameters

###### name

`string`

The command's full name, as [ScriptCustomCommand.name](#name-5) gives it.

###### origin

[`ScriptCommandOrigin`](#scriptcommandorigin)

###### args

readonly [`ScriptCommandArgument`](#scriptcommandargument)[]

The arguments in parameter order, mandatory ones first, without the ones left out.

###### Returns

[`ScriptCommandOutcome`](#scriptcommandoutcome)

***

### ScriptComponentSink

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

Where the world sends the hooks of the custom components its blocks and items name. A hook a
script can cancel runs at once, as a guard of the action it is about
([ADR 0013](https://jsprismarine.dev/adr/0013-vetoable-actions-are-staged.md)); every other hook waits
for the script flush at the end of the tick, as on BDS.

#### Methods

##### block()

> **block**(`event`): `boolean`

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

Raises a block hook.

###### Parameters

###### event

[`ScriptBlockHookEvent`](#scriptblockhookevent)

###### Returns

`boolean`

Whether a script canceled it, which only `beforeOnPlayerPlace` can.

##### handlesBlock()

> **handlesBlock**(`components`, `hook`): `boolean`

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

Whether a script registered one of the components with the hook, so the world can skip building an event.

###### Parameters

###### components

readonly [`ScriptComponentUse`](#scriptcomponentuse)[]

###### hook

`"beforeOnPlayerPlace"` \| `"onBlockStateChange"` \| `"onBreak"` \| `"onEntity"` \| `"onEntityFallOn"` \| `"onPlace"` \| `"onPlayerBreak"` \| `"onPlayerInteract"` \| `"onRandomTick"` \| `"onRedstoneUpdate"` \| `"onStepOn"` \| `"onTick"`

###### Returns

`boolean`

##### handlesItem()

> **handlesItem**(`components`, `hook`): `boolean`

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

Whether a script registered one of the components with the hook.

###### Parameters

###### components

readonly [`ScriptComponentUse`](#scriptcomponentuse)[]

###### hook

`"onCompleteUse"` \| `"onConsume"` \| `"onHitEntity"` \| `"onMineBlock"` \| `"onUse"` \| `"onUseOn"`

###### Returns

`boolean`

##### item()

> **item**(`event`): `void`

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

Raises an item hook.

###### Parameters

###### event

[`ScriptItemHookEvent`](#scriptitemhookevent)

###### Returns

`void`

***

### ScriptComponentUse

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

A custom component a block or item names, with the parameters it gives it.

#### Properties

##### legacy?

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

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

Whether a block names it in `minecraft:custom_components`, as the formats before version 2
did. Such a block gets no parameters and none of the hooks Mojang added after it, such as
`onBreak`, as the `custom-components` scenario recorded on BDS.

##### name

> `readonly` **name**: `string`

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

The component's name with its namespace.

##### params?

> `readonly` `optional` **params?**: `unknown`

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

The parameters a version 2 block or item gives the component, as JSON data.

***

### ScriptCustomCommand

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

A command a script registered in `startup`, as the world's command tree takes it.

#### Properties

##### cheatsRequired

> `readonly` **cheatsRequired**: `boolean`

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

##### description

> `readonly` **description**: `string`

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

##### mandatoryParameters

> `readonly` **mandatoryParameters**: readonly [`ScriptCommandParameter`](#scriptcommandparameter)[]

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

##### name

> `readonly` **name**: `string`

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

The name with its namespace, such as `jsp:hello`. BDS also answers to it without one.

##### optionalParameters

> `readonly` **optionalParameters**: readonly [`ScriptCommandParameter`](#scriptcommandparameter)[]

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

##### permissionLevel

> `readonly` **permissionLevel**: `number`

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

The `CommandPermissionLevel` it needs: 0 for anyone up to 4 for the owner.

***

### ScriptDamageSource

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

What hurt an entity, as `EntityDamageSource` reads it.

#### Properties

##### cause

> `readonly` **cause**: `string`

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

The cause, as `EntityDamageCause` names it, such as `fall` or `entityAttack`.

##### damagingEntity?

> `readonly` `optional` **damagingEntity?**: [`ScriptEntityRef`](#scriptentityref)

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

The entity answerable for the blow, such as the archer of an arrow.

##### damagingProjectile?

> `readonly` `optional` **damagingProjectile?**: [`ScriptEntityRef`](#scriptentityref)

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

The projectile that made contact, when it is not the damaging entity.

***

### ScriptDebugShape

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

A debug shape as the world draws it, from what a script set on a `@minecraft/debug-utilities`
shape. Each class's own properties are present for that class only. Floats hold what a 32-bit
float keeps of the script's number, as BDS's do.

#### Properties

##### attachedTo?

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

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

The id of the entity the shape follows, as [ScriptWorld.entity](#entity-1) takes it.

##### backfaceVisible?

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

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

##### backgroundColorOverride?

> `readonly` `optional` **backgroundColorOverride?**: [`ScriptRgba`](#scriptrgba)

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

##### bound?

> `readonly` `optional` **bound?**: [`ScriptVector3`](#scriptvector3)

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

A box's extent.

##### color

> `readonly` **color**: [`ScriptRgba`](#scriptrgba)

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

##### defaultVisibleToAll?

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

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

Whether a player `visibleTo` does not name sees it, when `visibleTo` names none; true when absent.

##### depth?

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

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

##### depthTest?

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

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

##### dimension?

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

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

The dimension it is drawn in, when the shape or `addShape` names one.

##### endLocation?

> `readonly` `optional` **endLocation?**: [`ScriptVector3`](#scriptvector3)

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

A line's or an arrow's other end.

##### headLength?

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

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

##### headRadius?

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

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

##### headSegments?

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

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

##### height?

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

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

##### hiddenFrom?

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

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

The players it is never drawn for, by id.

##### kind

> `readonly` **kind**: [`ScriptDebugShapeKind`](#scriptdebugshapekind-1)

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

##### lineGapHeight?

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

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

##### location

> `readonly` **location**: [`ScriptVector3`](#scriptvector3)

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

##### maximumRenderDistance?

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

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

##### numSegments?

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

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

A cone's or a cylinder's segments.

##### radii?

> `readonly` `optional` **radii?**: [`ScriptVector3`](#scriptvector3) \| [`ScriptVector2`](#scriptvector2)

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

A cone's or a cylinder's radii along X and Z, or an ellipsoid's along X, Y and Z.

##### rotation

> `readonly` **rotation**: [`ScriptVector3`](#scriptvector3)

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

Pitch, yaw and roll, as the script gave them.

##### scale

> `readonly` **scale**: `number`

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

##### segmentsPerAxis?

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

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

##### text?

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

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

A text's words, with a `RawMessage` read as chat reads one.

##### textBackfaceVisible?

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

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

##### timeLeft?

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

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

The seconds left before the shape goes, as the tick counts them; absent for a shape that stays.

##### useRotation?

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

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

##### visibleTo?

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

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

The players it is drawn for, by id. Absent or empty, it is drawn as `defaultVisibleToAll` says.

##### width?

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

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

A pyramid's base.

***

### ScriptDebugShapeChange

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

One change to the debug shapes a world draws: a shape to draw, or to draw again as it now is,
or, without `shape`, one to stop drawing.

#### Properties

##### id

> `readonly` **id**: `number`

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

The shape's id, unique in the world for as long as the world's scripts run.

##### shape?

> `readonly` `optional` **shape?**: [`ScriptDebugShape`](#scriptdebugshape)

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

***

### ScriptDisplay

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

What a display slot shows: an objective, and its order, as `ObjectiveSortOrder` numbers it.

#### Properties

##### objective

> `readonly` **objective**: `string`

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

##### sortOrder

> `readonly` **sortOrder**: `0` \| `1`

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

0 for ascending, 1 for descending.

***

### ScriptEffect

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

A status effect on an entity, as `Effect` reads it.

#### Extended by

- [`ScriptEffectRequest`](#scripteffectrequest)

#### Properties

##### amplifier

> `readonly` **amplifier**: `number`

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

One below the potency the effect's name shows.

##### duration

> `readonly` **duration**: `number`

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

The ticks left.

##### typeId

> `readonly` **typeId**: `string`

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

The effect's type, such as `minecraft:speed`.

***

### ScriptEffectRequest

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

A status effect a script adds to an entity.

#### Extends

- [`ScriptEffect`](#scripteffect)

#### Properties

##### amplifier

> `readonly` **amplifier**: `number`

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

One below the potency the effect's name shows.

###### Inherited from

[`ScriptEffect`](#scripteffect).[`amplifier`](#amplifier)

##### duration

> `readonly` **duration**: `number`

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

The ticks left.

###### Inherited from

[`ScriptEffect`](#scripteffect).[`duration`](#duration)

##### showParticles

> `readonly` **showParticles**: `boolean`

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

##### typeId

> `readonly` **typeId**: `string`

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

The effect's type, such as `minecraft:speed`.

###### Inherited from

[`ScriptEffect`](#scripteffect).[`typeId`](#typeid-1)

***

### ScriptEnchantment

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

An enchantment on a stack.

#### Properties

##### id

> `readonly` **id**: `string`

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

##### level

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

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

***

### ScriptEnchantmentInfo

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

An enchantment type, the items it goes on and the enchantments it refuses beside it.

#### Properties

##### conflicts

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

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

##### id

> `readonly` **id**: `string`

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

##### items

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

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

##### maxLevel

> `readonly` **maxLevel**: `number`

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

***

### ScriptEntityRef

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

An entity a command argument or a hook names: its id, and its type, which picks its class.

#### Properties

##### id

> `readonly` **id**: `string`

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

##### typeId

> `readonly` **typeId**: `string`

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

***

### ScriptEntityState

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

An entity as the world holds it now, read in one call.

#### Properties

##### dimension

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

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

The dimension it is in, as [ScriptWorld.dimensions](#dimensions) names it.

##### gameMode?

> `readonly` `optional` **gameMode?**: [`ScriptGameMode`](#scriptgamemode)

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

A player's game mode. Absent for every other entity.

##### headLocation?

> `readonly` `optional` **headLocation?**: [`ScriptVector3`](#scriptvector3)

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

Where its eyes are. Absent reads as its location.

##### id

> `readonly` **id**: `string`

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

The entity's id, which every other read and write names it by.

##### inventorySize?

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

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

How many slots its inventory has. Absent for an entity without one.

##### location

> `readonly` **location**: [`ScriptVector3`](#scriptvector3)

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

Where its feet are.

##### name?

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

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

A player's name. Absent for every other entity.

##### nameTag

> `readonly` **nameTag**: `string`

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

Its name tag; a player's is their name. Empty when it has none.

##### rotation?

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

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

Its rotation in degrees: `x` the pitch, `y` the yaw. Absent reads as facing south, level.

###### x

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

###### y

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

##### selectedSlot?

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

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

The hotbar slot a player holds, from 0 to 8. Absent for every other entity.

##### sneaking?

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

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

Whether it is sneaking.

##### tags

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

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

##### typeId

> `readonly` **typeId**: `string`

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

Its type, such as `minecraft:armor_stand`.

***

### ScriptEquipment

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

What an entity wears and holds, as `EntityEquippableComponent` reads it.

#### Properties

##### armor

> `readonly` **armor**: `number`

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

The armor points the worn pieces give, out of 20 for a full diamond set.

##### slots

> `readonly` **slots**: `Readonly`\<`Partial`\<`Record`\<[`ScriptEquipmentSlot`](#scriptequipmentslot), [`ScriptItem`](#scriptitem)\>\>\>

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

The stack in each slot, with an empty slot left out.

##### toughness

> `readonly` **toughness**: `number`

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

The armor toughness the worn pieces give.

***

### ScriptFormChannel

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

How the scripts' forms reach the world's players, and their answers come back.

#### Methods

##### closeAll()

> **closeAll**(`player`): `void`

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

Closes every form a player has open: a `ClientboundCloseFormPacket`.

###### Parameters

###### player

`string`

###### Returns

`void`

##### closeDataDriven()?

> `optional` **closeDataDriven**(`player`, `formId`): `void`

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

Asks the player's client to close one data-driven screen, which it reports closed in reply.

###### Parameters

###### player

`string`

###### formId

`number`

###### Returns

`void`

##### show()

> **show**(`player`, `formId`, `json`): `void`

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

Sends a player a form: a `ModalFormRequestPacket` with the id and the JSON as they are.

###### Parameters

###### player

`string`

###### formId

`number`

###### json

`string`

###### Returns

`void`

##### showDataDriven()?

> `optional` **showDataDriven**(`player`, `formId`, `screen`): `boolean`

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

Shows a player a data-driven screen: sets its data store property and opens it.

###### Parameters

###### player

`string`

###### formId

`number`

###### screen

[`DataDrivenScreen`](#datadrivenscreen)

###### Returns

`boolean`

Whether the player's client can show one. A world that cannot show any leaves this out.

##### takeDataDrivenResponses()?

> `optional` **takeDataDrivenResponses**(): readonly [`DataDrivenResponse`](#datadrivenresponse)[]

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

The data-driven screen writes and closes the input step admitted since the last call, in order.

###### Returns

readonly [`DataDrivenResponse`](#datadrivenresponse)[]

##### takeResponses()

> **takeResponses**(): readonly [`ScriptFormResponse`](#scriptformresponse)[]

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

The answers the input step admitted since the last call, in the order they arrived.

###### Returns

readonly [`ScriptFormResponse`](#scriptformresponse)[]

##### updateDataDriven()?

> `optional` **updateDataDriven**(`player`, `property`, `change`): `void`

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

Changes one path of a data-driven screen's property the player has open.

###### Parameters

###### player

`string`

###### property

`string`

###### change

[`DataDrivenPathValue`](#datadrivenpathvalue)

###### Returns

`void`

***

### ScriptFormResponse

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

A client's answer to a form, which reaches the scripts as an input of the tick it arrived in.

#### Properties

##### cancelReason

> `readonly` **cancelReason**: `number` \| `null`

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

The cancel reason byte the client sent, or null when it sent none.

##### formId

> `readonly` **formId**: `number`

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

The id the form was sent with.

##### player

> `readonly` **player**: `string`

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

The id of the player who answered, as [ScriptWorld.players](#players) lists it.

##### response

> `readonly` **response**: `string` \| `null`

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

The JSON text the client sent, or null when it sent none.

***

### ScriptGameEvent

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

An event the world raises for the scripts, by the Script API class its object has, such as
`PlayerPlaceBlockAfterEvent`, with each member's value by the member's name. A member with no
value reads `undefined`.

#### Properties

##### event

> `readonly` **event**: `string`

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

##### fields

> `readonly` **fields**: `Readonly`\<`Record`\<`string`, [`ScriptEventValue`](#scripteventvalue)\>\>

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

***

### ScriptHttpChannel

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

How the scripts' `@minecraft/server-net` requests reach the network, and their results come
back. The network runs off the tick, and a result is an input: it enters the world in a later
tick's input step, which records it, so a replay gets it back without the network
([ADR 0021](https://jsprismarine.dev/adr/0021-the-script-watchdog-counts-steps.md)).

#### Methods

##### cancel()

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

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

Abandons a request in flight; its result, if one comes, is dropped.

###### Parameters

###### id

`number`

###### Returns

`void`

##### send()

> **send**(`id`, `request`): `void`

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

Starts a request off the tick.

###### Parameters

###### id

`number`

The request's id, which its result carries. The runtime counts them from 1 and never reuses one.

###### request

[`ScriptHttpRequest`](#scripthttprequest)

###### Returns

`void`

##### takeResponses()

> **takeResponses**(): readonly [`ScriptHttpResult`](#scripthttpresult)[]

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

The results the input step admitted since the last call, in the order it admitted them.

###### Returns

readonly [`ScriptHttpResult`](#scripthttpresult)[]

***

### ScriptHttpRequest

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

One HTTP request a script sent, as the network gets it.

#### Properties

##### body

> `readonly` **body**: `string`

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

The body; a `Get` or `Head` request sends none.

##### headers

> `readonly` **headers**: readonly (readonly \[`string`, `string`\])[]

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

The headers in the order the script added them, each secret's text in place of its `SecretString`.

##### method

> `readonly` **method**: [`ScriptHttpMethod`](#scripthttpmethod)

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

##### timeout

> `readonly` **timeout**: `number`

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

Seconds before the request is abandoned; 0 for no limit.

##### uri

> `readonly` **uri**: `string`

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

An `http` or `https` URI.

***

### ScriptItem

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

An item stack as plain data.

#### Properties

##### amount

> `readonly` **amount**: `number`

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

##### blockProperties?

> `readonly` `optional` **blockProperties?**: [`ScriptProperties`](#scriptproperties)

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

The dynamic properties the stack gives the block it places, by id. Absent or empty for none.

##### book?

> `readonly` `optional` **book?**: [`ScriptBook`](#scriptbook)

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

A book's pages, title and author. Absent for a book with nothing written.

##### canDestroy?

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

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

The blocks an adventure-mode player may break with the stack. Absent or empty for none.

##### canPlaceOn?

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

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

The blocks an adventure-mode player may place the stack on. Absent or empty for none.

##### damage?

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

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

The durability the stack has lost, for an item with durability. Absent or 0 when it has lost none.

##### data?

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

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

The stack's aux value, which picks a potion's effect. Absent for 0.

##### dyeColor?

> `readonly` `optional` **dyeColor?**: [`ScriptRgb`](#scriptrgb)

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

The color a dyeable item was dyed, as red, green and blue from 0 to 1. Absent for its own.

##### dynamicProperties?

> `readonly` `optional` **dynamicProperties?**: `ReadonlyMap`\<`string`, [`ScriptProperties`](#scriptproperties)\>

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

The stack's dynamic properties, by the script module UUID of the pack that set them, as BDS
keys them on an item. Absent or empty when it has none. Only a stack of one item can hold
them.

##### enchantments?

> `readonly` `optional` **enchantments?**: readonly [`ScriptEnchantment`](#scriptenchantment)[]

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

The enchantments on the stack, by the Script API's id without a namespace, such as `sharpness`.

##### keepOnDeath?

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

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

Whether the stack stays in its owner's inventory when they die. Absent for false.

##### lockMode?

> `readonly` `optional` **lockMode?**: `"slot"` \| `"inventory"`

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

Where the stack is locked, as `ItemLockMode` names it. Absent for `none`.

##### lore?

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

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

The lines of lore under its name. Absent or empty when it has none.

##### nameTag?

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

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

The stack's custom name. Absent when it has none.

##### typeId

> `readonly` **typeId**: `string`

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

The item's type, such as `minecraft:apple`.

##### unbreakable?

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

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

Whether the stack takes no damage from use. Absent for false.

***

### ScriptItemInfo

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

An item type as the Script API describes it.

#### Properties

##### components

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

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

The components a new stack of the type has, by id.

##### compostable?

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

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

###### chance

> `readonly` **chance**: `number`

##### containerRules?

> `readonly` `optional` **containerRules?**: \{ `allowedItems`: readonly `string`[]; `allowNestedStorageItems`: `boolean`; `bannedItems`: readonly `string`[]; `weightLimit?`: `number`; \} \| `null`

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

##### cooldown?

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

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

###### category

> `readonly` **category**: `string`

###### ticks

> `readonly` **ticks**: `number`

##### durability?

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

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

###### damageChance

> `readonly` **damageChance**: readonly `number`[]

###### maxDurability

> `readonly` **maxDurability**: `number`

##### dyeable?

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

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

###### defaultColor?

> `readonly` `optional` **defaultColor?**: [`ScriptRgb`](#scriptrgb)

##### enchantable?

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

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

The enchantment slots of the type, one entry each, which BDS hands back as undefined.

###### slots

> `readonly` **slots**: readonly `unknown`[]

##### food?

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

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

###### canAlwaysEat

> `readonly` **canAlwaysEat**: `boolean`

###### nutrition

> `readonly` **nutrition**: `number`

###### saturationModifier

> `readonly` **saturationModifier**: `number`

###### usingConvertsTo

> `readonly` **usingConvertsTo**: `string`

##### inventorySize?

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

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

##### localizationKey

> `readonly` **localizationKey**: `string`

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

##### maxAmount

> `readonly` **maxAmount**: `number`

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

##### potion?

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

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

###### delivery

> `readonly` **delivery**: `string`

###### effect

> `readonly` **effect**: `string`

##### stackable

> `readonly` **stackable**: `boolean`

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

##### tags

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

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

##### weight

> `readonly` **weight**: `number`

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

***

### ScriptItemType

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

An item type the world knows.

#### Properties

##### maxDurability?

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

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

The durability a new stack has, for a type that wears out. Absent for every other type.

##### maxStackSize

> `readonly` **maxStackSize**: `number`

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

How many items one stack holds at most.

##### typeId

> `readonly` **typeId**: `string`

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

The type's full id, with its namespace.

***

### ScriptLegacyStates

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

How BDS's Script API reports a block type's states: every state of its default permutation, and
for a state another one decides, that state with the value each of its values gives.

#### Properties

##### defaults

> `readonly` **defaults**: `Readonly`\<`Record`\<`string`, [`ScriptStateValue`](#scriptstatevalue)\>\>

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

##### follows

> `readonly` **follows**: `Readonly`\<`Record`\<`string`, readonly `object`[]\>\>

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

***

### ScriptObjective

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

A scoreboard objective.

#### Properties

##### displayName

> `readonly` **displayName**: `string`

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

##### id

> `readonly` **id**: `string`

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

***

### ScriptParticipant

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

A scoreboard participant: a name with no entity, an entity or a player.

#### Properties

##### displayName

> `readonly` **displayName**: `string`

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

A fake player's name, a player's name, or an entity's id.

##### entity?

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

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

The id of its entity, when it is an entity or a player who is in the world.

##### id

> `readonly` **id**: `number`

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

The id the scoreboard gave it, which a save keeps.

##### type

> `readonly` **type**: [`ScriptParticipantType`](#scriptparticipanttype-1)

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

***

### ScriptRgb

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

A color without alpha, each part from 0 to 1.

#### Properties

##### blue

> `readonly` **blue**: `number`

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

##### green

> `readonly` **green**: `number`

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

##### red

> `readonly` **red**: `number`

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

***

### ScriptRgba

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

A color with alpha, each part from 0 to 1 as a script gives it, though nothing clamps it.

#### Properties

##### alpha

> `readonly` **alpha**: `number`

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

##### blue

> `readonly` **blue**: `number`

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

##### green

> `readonly` **green**: `number`

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

##### red

> `readonly` **red**: `number`

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

***

### ScriptScoreboard

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

The world's one scoreboard, which `/scoreboard` and the scripts share.

#### Methods

##### addObjective()

> **addObjective**(`id`, `displayName`): `boolean`

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

###### Parameters

###### id

`string`

###### displayName

`string`

###### Returns

`boolean`

False when an objective with the id exists.

##### display()

> **display**(`slot`): [`ScriptDisplay`](#scriptdisplay) \| `undefined`

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

What a display slot shows, or undefined when it is empty.

###### Parameters

###### slot

[`ScriptDisplaySlot`](#scriptdisplayslot)

###### Returns

[`ScriptDisplay`](#scriptdisplay) \| `undefined`

##### objective()

> **objective**(`id`): [`ScriptObjective`](#scriptobjective) \| `undefined`

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

###### Parameters

###### id

`string`

###### Returns

[`ScriptObjective`](#scriptobjective) \| `undefined`

##### objectives()

> **objectives**(): readonly [`ScriptObjective`](#scriptobjective)[]

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

Every objective, in the order they were added.

###### Returns

readonly [`ScriptObjective`](#scriptobjective)[]

##### participant()

> **participant**(`ref`): [`ScriptParticipant`](#scriptparticipant) \| `undefined`

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

Finds a participant that has a score in some objective, without making one.

###### Parameters

###### ref

[`ScriptParticipantRef`](#scriptparticipantref)

###### Returns

[`ScriptParticipant`](#scriptparticipant) \| `undefined`

##### participants()

> **participants**(): readonly [`ScriptParticipant`](#scriptparticipant)[]

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

Every participant with a score in some objective, in the order they first got one.

###### Returns

readonly [`ScriptParticipant`](#scriptparticipant)[]

##### removeObjective()

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

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

Removes an objective, its scores, and every display slot showing it.

###### Parameters

###### id

`string`

###### Returns

`boolean`

False when there is none.

##### removeScore()

> **removeScore**(`objective`, `participant`): `boolean`

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

###### Parameters

###### objective

`string`

###### participant

`number`

###### Returns

`boolean`

False when the participant had no score in the objective.

##### score()

> **score**(`objective`, `participant`): `number` \| `undefined`

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

A participant's score, or undefined when it has none in the objective.

###### Parameters

###### objective

`string`

###### participant

`number`

###### Returns

`number` \| `undefined`

##### scores()

> **scores**(`objective`): readonly `object`[]

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

Every score of an objective, by participant, in the order the participants first got one.

###### Parameters

###### objective

`string`

###### Returns

readonly `object`[]

##### setDisplay()

> **setDisplay**(`slot`, `display`): `void`

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

Shows an objective in a slot, or empties the slot when `display` is undefined.

###### Parameters

###### slot

[`ScriptDisplaySlot`](#scriptdisplayslot)

###### display

[`ScriptDisplay`](#scriptdisplay) \| `undefined`

###### Returns

`void`

##### setScore()

> **setScore**(`objective`, `ref`, `score`): [`ScriptParticipant`](#scriptparticipant)

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

Writes a score, making the participant when it has none.

###### Parameters

###### objective

`string`

###### ref

[`ScriptParticipantRef`](#scriptparticipantref)

###### score

`number`

A whole number in the 32-bit range.

###### Returns

[`ScriptParticipant`](#scriptparticipant)

The participant.

***

### ScriptSimulatedPlayers

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

The GameTest simulated players of a world: players with no client, which every script,
command and other player sees as a player ([ADR 0009](https://jsprismarine.dev/adr/0009-external-inputs-enter-once-per-tick.md)).

#### Methods

##### act()

> **act**(`id`, `action`): `boolean`

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

Makes a simulated player act.

###### Parameters

###### id

`string`

###### action

[`SimulatedPlayerAction`](#simulatedplayeraction)

###### Returns

`boolean`

Whether the action happened, such as a jump from the ground or a swing that hit.

##### remove()

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

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

Takes a simulated player out of the world, as a client's disconnect does.

###### Parameters

###### id

`string`

###### Returns

`void`

##### spawn()

> **spawn**(`name`, `dimension`, `location`, `gameMode`): `string` \| `undefined`

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

Adds a player with no client to the world, in the tick the call is made.

###### Parameters

###### name

`string`

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### gameMode

[`ScriptGameMode`](#scriptgamemode)

###### Returns

`string` \| `undefined`

The new player's id, as [ScriptWorld.players](#players) lists it, or undefined when
  the world cannot place a player there.

##### tick()

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

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

Moves the simulated players one tick on: their walks and jumps.

###### Returns

`void`

***

### ScriptSound

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

A sound a script plays, as `/playsound` plays one.

#### Properties

##### dimension

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

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

##### location

> `readonly` **location**: [`ScriptVector3`](#scriptvector3)

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

##### pitch

> `readonly` **pitch**: `number`

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

##### player?

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

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

The id of the one player who hears it. Everyone near the location hears it when absent.

##### sound

> `readonly` **sound**: `string`

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

The sound's name, such as `random.orb`.

##### volume

> `readonly` **volume**: `number`

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

***

### ScriptStructure

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

A structure as plain data: a box of blocks, each an index into its palette, or -1 where the
structure has no block, as a structure void leaves one.

#### Properties

##### blocks

> `readonly` **blocks**: readonly `number`[]

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

The blocks, x outermost, then y, then z, as a `.mcstructure` orders them.

##### palette

> `readonly` **palette**: readonly [`ScriptBlockPermutation`](#scriptblockpermutation)[]

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

##### saveMode

> `readonly` **saveMode**: [`ScriptStructureSaveMode`](#scriptstructuresavemode-1)

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

##### size

> `readonly` **size**: [`ScriptVector3`](#scriptvector3)

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

***

### ScriptStructureStore

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

The structures of a world, by their ids with a namespace, such as `mystructure:house`: the ones
scripts keep, and the ones the world's behavior packs ship in `structures/`, which `get` finds
when no kept structure has the id.

#### Methods

##### delete()

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

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

###### Parameters

###### id

`string`

###### Returns

`boolean`

False when there was none.

##### get()

> **get**(`id`): [`ScriptStructure`](#scriptstructure) \| `undefined`

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

###### Parameters

###### id

`string`

###### Returns

[`ScriptStructure`](#scriptstructure) \| `undefined`

##### ids()

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

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

Every id scripts keep, in the order the structures were first kept.

###### Returns

readonly `string`[]

##### packIds()?

> `optional` **packIds**(): readonly `string`[]

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

The ids of the structures the packs ship, which `getPackStructureIds` lists. None when absent.

###### Returns

readonly `string`[]

##### set()

> **set**(`id`, `structure`): `void`

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

###### Parameters

###### id

`string`

###### structure

[`ScriptStructure`](#scriptstructure)

###### Returns

`void`

***

### ScriptVector2

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

A pair of numbers, such as a cone's radii along X and Z.

#### Properties

##### x

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

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

##### y

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

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

***

### ScriptVector3

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

A position in a dimension, in blocks.

#### Extended by

- [`ScriptBlockLocation`](#scriptblocklocation)
- [`ScriptDimensionLocation`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/entities/world/index.md#scriptdimensionlocation)

#### Properties

##### 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)

##### 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)

##### 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)

***

### ScriptWaterAnswers

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

What water does to a permutation, by the four `LiquidType.Water` questions of the Script API.

#### Properties

##### blocking

> `readonly` **blocking**: `boolean`

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

##### contain

> `readonly` **contain**: `boolean`

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

##### destroyed

> `readonly` **destroyed**: `boolean`

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

##### spawns

> `readonly` **spawns**: `boolean`

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

***

### ScriptWorld

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

What the script host reads and writes of one world.

#### Properties

##### catalog?

> `readonly` `optional` **catalog?**: [`ScriptCatalog`](#scriptcatalog)

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

The game's block, item, enchantment and potion types. A world without it has only the types it resolves.

##### entitySystems?

> `readonly` `optional` **entitySystems?**: [`ScriptEntitySystems`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/entities/world/index.md#scriptentitysystems)

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

The entity and player systems the entity members reach. A world without them gives those members no behavior.

##### forms?

> `readonly` `optional` **forms?**: [`ScriptFormChannel`](#scriptformchannel)

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

The channel `@minecraft/server-ui` forms travel over. A world without one sends no form.

##### http?

> `readonly` `optional` **http?**: [`ScriptHttpChannel`](#scripthttpchannel)

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

The channel `@minecraft/server-net` requests travel over. A world without one fails each request.

##### scoreboard

> `readonly` **scoreboard**: [`ScriptScoreboard`](#scriptscoreboard)

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

The world's scoreboard, which `/scoreboard` shares.

##### simulatedPlayers?

> `readonly` `optional` **simulatedPlayers?**: [`ScriptSimulatedPlayers`](#scriptsimulatedplayers)

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

The world's GameTest simulated players. A world without them refuses to spawn one.

##### structures?

> `readonly` `optional` **structures?**: [`ScriptStructureStore`](#scriptstructurestore)

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

The world's structures, which `world.structureManager` reads and writes. A world without them keeps none.

##### worldSystem?

> `readonly` `optional` **worldSystem?**: [`ScriptWorldSystem`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/worldsystem/seam/index.md#scriptworldsystem)

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

The world's clock, spawn, difficulty, game rules and music, which the world and system
members read and write. A world without it keeps them in memory for as long as its packs run.

#### Methods

##### addEffect()?

> `optional` **addEffect**(`id`, `effect`): `void`

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

Adds a status effect to an entity, as `/effect` does: one that is no stronger and no longer
than the effect it already has changes nothing.

###### Parameters

###### id

`string`

###### effect

[`ScriptEffectRequest`](#scripteffectrequest)

###### Returns

`void`

##### addTag()

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

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

###### Parameters

###### id

`string`

###### tag

`string`

###### Returns

`boolean`

False when the entity already has the tag.

##### applyDamage()?

> `optional` **applyDamage**(`id`, `amount`, `source`): `boolean`

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

Hurts an entity through the world's damage pipeline, as `/damage` does.

###### Parameters

###### id

`string`

###### amount

`number`

The blow, before armor and resistance.

###### source

[`ScriptDamageSource`](#scriptdamagesource)

###### Returns

`boolean`

Whether the blow landed. A blow no stronger than the one the entity is still
  recovering from lands without taking health, and one at a dead entity does not land.

##### attribute()?

> `optional` **attribute**(`id`, `name`): [`ScriptAttribute`](#scriptattribute) \| `undefined`

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

One of an entity's attributes.

###### Parameters

###### id

`string`

###### name

`string`

The attribute component's id, such as `minecraft:health`.

###### Returns

[`ScriptAttribute`](#scriptattribute) \| `undefined`

Undefined for an entity that is gone or whose type has no such attribute.

##### bindComponents()?

> `optional` **bindComponents**(`sink`): () => `void`

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

Sends the hooks of the custom components the world's blocks and items name to `sink`, once
the scripts have registered them. A world without it raises no hook.

###### Parameters

###### sink

[`ScriptComponentSink`](#scriptcomponentsink)

###### Returns

A function that stops it.

() => `void`

##### block()

> **block**(`dimension`, `location`): [`ScriptBlockPermutation`](#scriptblockpermutation) \| `undefined`

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

Reads one block.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

A block position, in whole numbers.

###### Returns

[`ScriptBlockPermutation`](#scriptblockpermutation) \| `undefined`

Undefined when its chunk is not loaded.

##### blockInventory()?

> `optional` **blockInventory**(`dimension`, `location`): readonly ([`ScriptItem`](#scriptitem) \| `null`)[] \| `undefined`

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

The slots of the container a block holds, such as a chest's, each the stack it holds or null.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

readonly ([`ScriptItem`](#scriptitem) \| `null`)[] \| `undefined`

Undefined for a block that holds none, or one in a chunk that is not loaded.

##### blockLight()?

> `optional` **blockLight**(`dimension`, `location`): \{ `block`: `number`; `sky`: `number`; \} \| `undefined`

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

The block light and sky light at a loaded block, each from 0 to 15, or undefined where its chunk is not loaded.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

\{ `block`: `number`; `sky`: `number`; \} \| `undefined`

##### clearDynamicProperties()

> **clearDynamicProperties**(`owner`, `pack`): `void`

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

Deletes every dynamic property one pack set on the world or on a live entity.

###### Parameters

###### owner

[`ScriptPropertyOwner`](#scriptpropertyowner)

###### pack

`string`

###### Returns

`void`

##### clock()

> **clock**(): `number`

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

The wall clock as the input step admitted it for the current tick, in milliseconds since
the epoch. `Date` reads this rather than the host's clock, so a replay sees the same dates
([ADR 0021](https://jsprismarine.dev/adr/0021-the-script-watchdog-counts-steps.md)).

###### Returns

`number`

##### dimensions()

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

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

The world's dimensions, as Bedrock names them, such as `minecraft:overworld`.

###### Returns

readonly `string`[]

##### dimensionTypes()?

> `optional` **dimensionTypes**(): readonly `string`[]

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

Every dimension type the world registers, as Bedrock names them, in the order of their
numeric ids. A world without it lists its dimensions.

###### Returns

readonly `string`[]

##### drawDebugShapes()?

> `optional` **drawDebugShapes**(`changes`): `void`

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

Draws, redraws or removes `@minecraft/debug-utilities` shapes for every player, once per
script flush that changed any. A world without it draws none, and the scripts still read
their shapes back the same.

###### Parameters

###### changes

readonly [`ScriptDebugShapeChange`](#scriptdebugshapechange)[]

###### Returns

`void`

##### dynamicProperties()

> **dynamicProperties**(`owner`, `pack`): [`ScriptProperties`](#scriptproperties) \| `undefined`

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

One pack's dynamic properties of the world or of an entity.

###### Parameters

###### owner

[`ScriptPropertyOwner`](#scriptpropertyowner)

###### pack

`string`

The pack's header UUID, which BDS keys a world's and an entity's properties by.

###### Returns

[`ScriptProperties`](#scriptproperties) \| `undefined`

Undefined for an entity that is gone.

##### effects()?

> `optional` **effects**(`id`): readonly [`ScriptEffect`](#scripteffect)[] \| `undefined`

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

The status effects on an entity, in the order they were added.

###### Parameters

###### id

`string`

###### Returns

readonly [`ScriptEffect`](#scripteffect)[] \| `undefined`

Undefined for an entity that is gone.

##### effectTypes()?

> `optional` **effectTypes**(): readonly `string`[]

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

Every status effect type the world knows, by its id with a namespace.

###### Returns

readonly `string`[]

##### entities()

> **entities**(`dimension`): readonly [`ScriptEntityState`](#scriptentitystate)[]

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

Every entity of a dimension that is loaded, players included, in a fixed order.

###### Parameters

###### dimension

`string`

###### Returns

readonly [`ScriptEntityState`](#scriptentitystate)[]

##### entity()

> **entity**(`id`): [`ScriptEntityState`](#scriptentitystate) \| `undefined`

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

Reads one entity, a player included.

###### Parameters

###### id

`string`

###### Returns

[`ScriptEntityState`](#scriptentitystate) \| `undefined`

Undefined once the entity is dead or gone, which makes its script object invalid.

##### equipment()?

> `optional` **equipment**(`id`): [`ScriptEquipment`](#scriptequipment) \| `undefined`

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

What an entity wears and holds.

###### Parameters

###### id

`string`

###### Returns

[`ScriptEquipment`](#scriptequipment) \| `undefined`

Undefined for an entity that is gone or has no equipment a script reaches, which
  is any but a player, as on BDS.

##### guardBlockBreak()?

> `optional` **guardBlockBreak**(`guard`): () => `void`

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

Adds a guard to the block breaking of the world's players, which runs before the block goes.
A veto leaves the block where it is.

###### Parameters

###### guard

[`VetoGuard`](#vetoguard)\<[`BlockBreakIntent`](#blockbreakintent)\>

###### Returns

A function that removes it.

() => `void`

##### guardBlockInteract()?

> `optional` **guardBlockInteract**(`guard`): () => `void`

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

Adds a guard to the block clicks of the world's players, which runs before the click opens,
uses or places anything. A veto drops the click.

###### Parameters

###### guard

[`VetoGuard`](#vetoguard)\<[`BlockInteractIntent`](#blockinteractintent)\>

###### Returns

A function that removes it.

() => `void`

##### guardChat()

> **guardChat**(`guard`): () => `void`

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

Adds a guard to the chat action of the world's players, which runs before any other
player, the console or a plugin gets the line. A veto drops the line. The guard cannot
change the line: `ChatSendBeforeEvent.message` is read-only in the Script API.

###### Parameters

###### guard

[`VetoGuard`](#vetoguard)\<[`ChatSendIntent`](#chatsendintent)\>

###### Returns

A function that removes it.

() => `void`

##### guardEntityInteract()?

> `optional` **guardEntityInteract**(`guard`): () => `void`

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

Adds a guard to the entity clicks of the world's players, which runs before the click does
anything. A veto drops the click.

###### Parameters

###### guard

[`VetoGuard`](#vetoguard)\<[`EntityInteractIntent`](#entityinteractintent)\>

###### Returns

A function that removes it.

() => `void`

##### guardGameEvents()?

> `optional` **guardGameEvents**(`guard`): () => `void`

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

Adds a guard to every action a before-event of [ScriptGameEvent](#scriptgameevent) describes, such as a
player's block placement. The world calls it before the action, and the action goes on with
the fields the verdict hands back. A world without it raises none of those before-events.

###### Parameters

###### guard

[`ScriptGameEventGuard`](#scriptgameeventguard)

###### Returns

A function that removes the guard.

() => `void`

##### guardItemUse()?

> `optional` **guardItemUse**(`guard`): () => `void`

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

Adds a guard to the item use of the world's players, which runs before the item acts. A veto
stops the use.

###### Parameters

###### guard

[`VetoGuard`](#vetoguard)\<[`ItemUseIntent`](#itemuseintent)\>

###### Returns

A function that removes it.

() => `void`

##### guardWeather()

> **guardWeather**(`guard`): () => `void`

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

Adds a guard to the weather action's guard stage.

###### Parameters

###### guard

[`Guard`](#guard)\<[`WeatherChangeIntent`](#weatherchangeintent)\>

###### Returns

A function that removes it.

() => `void`

##### heightRange()

> **heightRange**(`dimension`): `object`

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

The lowest block height of a dimension, and the height above its top block.

###### Parameters

###### dimension

`string`

###### Returns

`object`

###### max

> `readonly` **max**: `number`

###### min

> `readonly` **min**: `number`

##### inventory()

> **inventory**(`id`): readonly ([`ScriptItem`](#scriptitem) \| `null`)[] \| `undefined`

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

The slots of an entity's inventory, in order, each the stack it holds or null.

###### Parameters

###### id

`string`

###### Returns

readonly ([`ScriptItem`](#scriptitem) \| `null`)[] \| `undefined`

Undefined for an entity without an inventory.

##### isEffectType()?

> `optional` **isEffectType**(`typeId`): `boolean`

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

Whether the world knows a status effect type, such as `minecraft:speed`.

###### Parameters

###### typeId

`string`

###### Returns

`boolean`

##### itemType()

> **itemType**(`typeId`): [`ScriptItemType`](#scriptitemtype) \| `undefined`

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

Looks an item type up.

###### Parameters

###### typeId

`string`

The type with its namespace.

###### Returns

[`ScriptItemType`](#scriptitemtype) \| `undefined`

##### jobSteps()?

> `optional` **jobSteps**(): `number`

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

The interpreter steps the `system.runJob` jobs may take this tick, as the input step admitted
them: BDS gives jobs a time slice from its frame-time estimates, and a host that measures
its ticks turns the time left into steps. Absent, jobs take `JOB_STEPS_PER_TICK`.

###### Returns

`number`

##### kill()

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

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

Kills an entity through the world's damage pipeline, as `/kill` does.

###### Parameters

###### id

`string`

###### Returns

`boolean`

Whether it died.

##### legacyStates()?

> `optional` **legacyStates**(`typeId`): [`ScriptLegacyStates`](#scriptlegacystates) \| `undefined`

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

The states BDS's Script API reports for a block type beside the ones the world keeps, such
as an oak log's `old_log_type` or a slab's `top_slot_bit`, or undefined for a world without
them. A permutation a script reads carries them, and one a script writes may name them.

###### Parameters

###### typeId

`string`

###### Returns

[`ScriptLegacyStates`](#scriptlegacystates) \| `undefined`

##### placeStructure()?

> `optional` **placeStructure**(`dimension`, `location`, `structure`): `void`

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

Places a GameTest's `.mcstructure` with its lowest corner at a location. A world that cannot
read the format leaves the blocks there as they are.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### structure

`Uint8Array`

The file's bytes.

###### Returns

`void`

##### players()

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

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

The ids of the players in the world, in the order they joined.

###### Returns

readonly `string`[]

##### playSound()?

> `optional` **playSound**(`sound`): `void`

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

Plays a sound, as `/playsound` does. A world without it plays none.

###### Parameters

###### sound

[`ScriptSound`](#scriptsound)

###### Returns

`void`

##### redstonePower()?

> `optional` **redstonePower**(`dimension`, `location`): `number` \| `undefined`

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

The redstone power a loaded block holds, or undefined for a block that carries none.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

`number` \| `undefined`

##### registerCommands()?

> `optional` **registerCommands**(`commands`): () => `void`

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

Puts the custom commands the scripts registered into the world's command tree, after
`startup`. A world without it has no custom commands.

###### Parameters

###### commands

[`ScriptCommandSet`](#scriptcommandset)

###### Returns

A function that takes them out again, which a reload calls before it registers anew.

() => `void`

##### registerCustomDimension()?

> `optional` **registerCustomDimension**(`typeId`): `"registered"` \| `"new-after-reload"`

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

Adds a void dimension a script registered in `startup`, which [ScriptWorld.dimensions](#dimensions)
lists from then on. A dimension the world already has is registered again. A world that
cannot add a dimension once its first scripts have started answers `new-after-reload`, as
BDS does. Left out, the world takes every registration and adds no dimension.

###### Parameters

###### typeId

`string`

###### Returns

`"registered"` \| `"new-after-reload"`

##### remove()

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

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

Takes an entity out of the world without killing it, so it drops nothing.

###### Parameters

###### id

`string`

###### Returns

`void`

##### removeEffect()?

> `optional` **removeEffect**(`id`, `typeId`): `boolean`

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

###### Parameters

###### id

`string`

###### typeId

`string`

###### Returns

`boolean`

False when the entity has no such effect.

##### removeTag()

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

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

###### Parameters

###### id

`string`

###### tag

`string`

###### Returns

`boolean`

False when the entity does not have the tag.

##### resolveBlock()

> **resolveBlock**(`typeId`, `states`): [`ScriptBlockPermutation`](#scriptblockpermutation) \| `undefined`

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

Completes a block permutation from its type and some of its states, each state left out
taking its default.

###### Parameters

###### typeId

`string`

The type with its namespace.

###### states

`Readonly`\<`Record`\<`string`, `string` \| `number` \| `boolean`\>\>

###### Returns

[`ScriptBlockPermutation`](#scriptblockpermutation) \| `undefined`

Undefined for a type the world does not have, or a state the type does not have.
  A state value the type does not allow takes the state's default.

##### runCommand()

> **runCommand**(`command`, `source`): [`ScriptCommandResult`](#scriptcommandresult)

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

Runs a command as `source`, to its end, and tells what it did.

###### Parameters

###### command

`string`

The command without its slash.

###### source

[`ScriptCommandSource`](#scriptcommandsource)

###### Returns

[`ScriptCommandResult`](#scriptcommandresult)

##### selectEntities()?

> `optional` **selectEntities**(`selector`, `player`): readonly `string`[] \| `undefined`

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

The entities a target selector matches, read by the world's own selector grammar, for a
template's `selector` node: `@a`, `@a[tag=vip]`, `@e[type=pig]` or a player's name.

###### Parameters

###### selector

`string`

###### player

`string` \| `undefined`

The entity the selector is read for, which `@s` and `@p` name, or undefined
  for the server.

###### Returns

readonly `string`[] \| `undefined`

The matched entities' ids, or undefined for a selector that does not parse.

##### sendMessage()

> **sendMessage**(`message`, `player?`): `void`

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

Puts a line of chat on the screen of every player in the world, or of one.

###### Parameters

###### message

`string`

###### player?

`string`

The id of the one player, as [ScriptWorld.players](#players) lists it.

###### Returns

`void`

##### setAttribute()?

> `optional` **setAttribute**(`id`, `name`, `value`): `void`

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

Writes an attribute's value, within its bounds, and tells the clients that see it.

###### Parameters

###### id

`string`

###### name

`string`

###### value

`number`

###### Returns

`void`

##### setBlock()

> **setBlock**(`dimension`, `location`, `permutation`): `void`

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

Sets one block through the world's setter, which tells clients and neighbors.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### permutation

[`ScriptBlockPermutation`](#scriptblockpermutation)

###### Returns

`void`

##### setBlockInventoryItem()?

> `optional` **setBlockInventoryItem**(`dimension`, `location`, `slot`, `item`): `void`

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

Puts a stack into one slot of a block's container, or empties it.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### slot

`number`

###### item

[`ScriptItem`](#scriptitem) \| `undefined`

###### Returns

`void`

##### setDynamicProperties()

> **setDynamicProperties**(`owner`, `pack`, `values`): `void`

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

Writes some of one pack's dynamic properties of the world or of a live entity through the
world's setter: each value replaces the property's, and undefined deletes it.

###### Parameters

###### owner

[`ScriptPropertyOwner`](#scriptpropertyowner)

###### pack

`string`

The pack's header UUID.

###### values

`ReadonlyMap`\<`string`, [`ScriptPropertyValue`](#scriptpropertyvalue) \| `undefined`\>

###### Returns

`void`

##### setEquipment()?

> `optional` **setEquipment**(`id`, `slot`, `item`): `boolean`

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

Puts a stack into one equipment slot, or empties it, and tells the clients that see it.

###### Parameters

###### id

`string`

###### slot

[`ScriptEquipmentSlot`](#scriptequipmentslot)

###### item

[`ScriptItem`](#scriptitem) \| `undefined`

###### Returns

`boolean`

False when the slot cannot hold the stack, such as an apple on the chest.

##### setGameMode()?

> `optional` **setGameMode**(`id`, `gameMode`): `void`

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

Sets a player's game mode, as `/gamemode` does.

###### Parameters

###### id

`string`

###### gameMode

[`ScriptGameMode`](#scriptgamemode)

###### Returns

`void`

##### setInventoryItem()

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

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

Puts a stack into one slot of an entity's inventory, or empties it.

###### Parameters

###### id

`string`

###### slot

`number`

###### item

[`ScriptItem`](#scriptitem) \| `undefined`

###### Returns

`void`

##### setNameTag()

> **setNameTag**(`id`, `nameTag`): `void`

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

###### Parameters

###### id

`string`

###### nameTag

`string`

###### Returns

`void`

##### setSelectedSlot()?

> `optional` **setSelectedSlot**(`id`, `slot`): `void`

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

Moves a player's hand to a hotbar slot, from 0 to 8, and tells their client.

###### Parameters

###### id

`string`

###### slot

`number`

###### Returns

`void`

##### setSneaking()?

> `optional` **setSneaking**(`id`, `sneaking`): `void`

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

Makes an entity sneak or stand, and tells the clients that see it.

###### Parameters

###### id

`string`

###### sneaking

`boolean`

###### Returns

`void`

##### settleCustomDimensions()?

> `optional` **settleCustomDimensions**(`registered`): `void`

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

Called after each run's `startup`, the first and every reload's, with every dimension that
run registered. The world may drop a dimension an earlier run registered that this one did
not.

###### Parameters

###### registered

readonly `string`[]

###### Returns

`void`

##### setWaterlogged()?

> `optional` **setWaterlogged**(`dimension`, `location`, `waterlogged`): `void`

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

Puts water into a loaded block's liquid layer, or takes it out.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### waterlogged

`boolean`

###### Returns

`void`

##### setWeather()

> **setWeather**(`dimension`, `weather`, `duration`): `void`

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

Changes a dimension's weather through the world's weather action: its guards run, and a
change they let through is committed and taken as a `weatherChange` event later.

###### Parameters

###### dimension

`string`

###### weather

[`ScriptWeather`](#scriptweather)

###### duration

`number`

How long, in ticks.

###### Returns

`void`

##### showTitle()?

> `optional` **showTitle**(`player`, `title`): `void`

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

Sends a player a title instruction, as `/title` does. A world without it shows no title.

###### Parameters

###### player

`string`

###### title

[`ScriptTitle`](#scripttitle)

###### Returns

`void`

##### spawnEntity()

> **spawnEntity**(`dimension`, `typeId`, `location`): `string`

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

Spawns an entity through the world's own spawn.

###### Parameters

###### dimension

`string`

###### typeId

`string`

The type with its namespace.

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

`string`

The new entity's id, `unknown-type` for a type the world has no definition of, or
  `unloaded` when the location's chunk is not loaded.

##### spawnParticle()?

> `optional` **spawnParticle**(`dimension`, `effect`, `location`, `molangVariables?`, `player?`): `void`

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

Spawns a particle effect for the players near a location, as `/particle` does, or for one player.

###### Parameters

###### dimension

`string`

###### effect

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### molangVariables?

`string`

The JSON of the effect's MoLang variables, as `SpawnParticleEffectPacket` carries it.

###### player?

`string`

The id of the one player who sees it. Everyone near the location sees it when absent.

###### Returns

`void`

##### takeEvents()

> **takeEvents**(): readonly [`ScriptWorldEvent`](#scriptworldevent)[]

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

The changes the world committed since the last call, in the order it committed them.

###### Returns

readonly [`ScriptWorldEvent`](#scriptworldevent)[]

##### teleport()

> **teleport**(`id`, `dimension`, `location`): `void`

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

Moves an entity to a location of a dimension, as `/teleport` does.

###### Parameters

###### id

`string`

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

`void`

##### transferPlayer()?

> `optional` **transferPlayer**(`id`, `target`): `void`

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

Sends a player to another server, as `/transfer` does. A world without it transfers no one.

###### Parameters

###### id

`string`

###### target

[`ScriptTransferTarget`](#scripttransfertarget)

###### Returns

`void`

##### watchPlayerLeave()

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

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

Calls `listener` with a player's id while they leave, before their entity goes, for
`world.beforeEvents.playerLeave`.

###### Parameters

###### listener

(`player`) => `void`

###### Returns

A function that stops it.

() => `void`

##### waterlogged()?

> `optional` **waterlogged**(`dimension`, `location`): `boolean` \| `undefined`

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

Whether a loaded block holds water in its liquid layer.

###### Parameters

###### dimension

`string`

###### location

[`ScriptVector3`](#scriptvector3)

###### Returns

`boolean` \| `undefined`

##### weather()

> **weather**(`dimension`): [`ScriptWeather`](#scriptweather)

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

The weather of a dimension now.

###### Parameters

###### dimension

`string`

###### Returns

[`ScriptWeather`](#scriptweather)

***

### VetoVerdict

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

What a guard of an action no script may change decides: veto it, or let it go on as it is.

#### Properties

##### intent?

> `readonly` `optional` **intent?**: `undefined`

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

A guard that can only veto hands back no intent.

##### veto

> `readonly` **veto**: `boolean`

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

***

### WeatherChangeIntent

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

A weather change a script's before-event sees before the world commits it.

#### Properties

##### dimension

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

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

The dimension, as Bedrock names it, such as `minecraft:overworld`.

##### duration

> `readonly` **duration**: `number`

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

How long the new weather lasts, in ticks.

##### newWeather

> `readonly` **newWeather**: [`ScriptWeather`](#scriptweather)

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

##### previousWeather

> `readonly` **previousWeather**: [`ScriptWeather`](#scriptweather)

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

## Type Aliases

### DataDrivenCloseReason

> **DataDrivenCloseReason** = `"programmaticclose"` \| `"programmaticcloseall"` \| `"clientcanceled"` \| `"userbusy"` \| `"invalidform"`

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

Why a client says a data-driven screen closed, as `ServerboundDataDrivenScreenClosedPacket` spells it.

***

### DataDrivenLeaf

> **DataDrivenLeaf** = `boolean` \| `number` \| `string`

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

A value one path of a data store property can take, which a client's write carries too.

***

### DataDrivenResponse

> **DataDrivenResponse** = \{ `path`: `string`; `player`: `string`; `property`: `string`; `value`: [`DataDrivenLeaf`](#datadrivenleaf); \} \| \{ `formId`: `number`; `player`: `string`; `reason`: [`DataDrivenCloseReason`](#datadrivenclosereason); \}

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

What a client sends about a data-driven screen: a write to one path of its property, which is a
click when the path is a button's `onClick`, or the screen closing with a reason.

#### Union Members

##### Type Literal

\{ `path`: `string`; `player`: `string`; `property`: `string`; `value`: [`DataDrivenLeaf`](#datadrivenleaf); \}

###### path

> `readonly` **path**: `string`

###### player

> `readonly` **player**: `string`

The id of the player who wrote, as [ScriptWorld.players](#players) lists it.

###### property

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

The data store property written to.

###### value

> `readonly` **value**: [`DataDrivenLeaf`](#datadrivenleaf)

***

##### Type Literal

\{ `formId`: `number`; `player`: `string`; `reason`: [`DataDrivenCloseReason`](#datadrivenclosereason); \}

###### formId

> `readonly` **formId**: `number`

The id the screen was shown with.

###### player

> `readonly` **player**: `string`

The id of the player whose screen closed, as [ScriptWorld.players](#players) lists it.

###### reason

> `readonly` **reason**: [`DataDrivenCloseReason`](#datadrivenclosereason)

***

### DataDrivenValue

> **DataDrivenValue** = `null` \| `boolean` \| `number` \| `bigint` \| `string` \| readonly [`DataDrivenValue`](#datadrivenvalue)[] \| [`DataDrivenRecord`](#datadrivenrecord)

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

A value in a data-driven screen's data store property. A record is a map and an array a list;
a bigint is a count BDS sends as an int64, such as a layout's `length`, and every other number
travels as a double. Null is a property with no value.

***

### Guard

> **Guard**\<`Intent`\> = (`intent`) => [`GuardVerdict`](#guardverdict)\<`Intent`\>

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

A guard in an action's guard stage. It reads the intent and writes nothing.

#### Type Parameters

##### Intent

`Intent`

#### Parameters

##### intent

`Intent`

#### Returns

[`GuardVerdict`](#guardverdict)\<`Intent`\>

***

### GuardVerdict

> **GuardVerdict**\<`Intent`\> = \{ `veto`: `true`; \} \| \{ `intent`: `Intent`; `veto`: `false`; \}

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

What a guard decides: let the action go on, with the intent it may have replaced, or veto it.

#### Type Parameters

##### Intent

`Intent`

***

### ScriptBlockHook

> **ScriptBlockHook** = [`ScriptBlockHookEvent`](#scriptblockhookevent)\[`"hook"`\]

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

The block hooks a custom component can have, as [ScriptBlockHookEvent](#scriptblockhookevent) names them.

***

### ScriptBlockHookEvent

> **ScriptBlockHookEvent** = `object` & (\{ `hook`: `"onPlace"`; `previousBlock`: [`ScriptBlockPermutation`](#scriptblockpermutation); \} \| \{ `brokenBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); `entitySource?`: [`ScriptEntityRef`](#scriptentityref); `hook`: `"onBreak"`; \} \| \{ `brokenBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); `hook`: `"onPlayerBreak"`; `player?`: [`ScriptEntityRef`](#scriptentityref); \} \| \{ `face`: [`ScriptDirection`](#scriptdirection); `faceLocation?`: [`ScriptVector3`](#scriptvector3); `hook`: `"onPlayerInteract"`; `player?`: [`ScriptEntityRef`](#scriptentityref); \} \| \{ `face`: [`ScriptDirection`](#scriptdirection); `hook`: `"beforeOnPlayerPlace"`; `permutationToPlace`: [`ScriptBlockPermutation`](#scriptblockpermutation); `player?`: [`ScriptEntityRef`](#scriptentityref); \} \| \{ `hook`: `"onTick"` \| `"onRandomTick"`; \} \| \{ `entity?`: [`ScriptEntityRef`](#scriptentityref); `hook`: `"onStepOn"`; \} \| \{ `entity?`: [`ScriptEntityRef`](#scriptentityref); `fallDistance`: `number`; `hook`: `"onEntityFallOn"`; \} \| \{ `blockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); `entitySource?`: [`ScriptEntityRef`](#scriptentityref); `hook`: `"onEntity"`; `name`: `string`; \} \| \{ `firstUpdate`: `boolean`; `hook`: `"onRedstoneUpdate"`; `powerLevel`: `number`; `previousPowerLevel`: `number`; \} \| \{ `hook`: `"onBlockStateChange"`; `previousPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); \})

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

A block hook the world raises for the custom components a block names.

#### Type Declaration

##### block

> `readonly` **block**: [`ScriptBlockLocation`](#scriptblocklocation)

##### components

> `readonly` **components**: readonly [`ScriptComponentUse`](#scriptcomponentuse)[]

***

### ScriptBookPage

> **ScriptBookPage** = \{ `text`: `string`; \} \| \{ `raw`: `string`; \}

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

One page of a book: its text, or the JSON of the `RawMessage` a script wrote on it.

***

### ScriptCommandArgument

> **ScriptCommandArgument** = `string` \| `number` \| `boolean` \| \{ `kind`: `"location"`; `location`: [`ScriptVector3`](#scriptvector3); \} \| \{ `entities`: readonly [`ScriptEntityRef`](#scriptentityref)[]; `kind`: `"entities"`; \} \| \{ `id`: `string`; `kind`: `"entityType"` \| `"itemType"` \| `"blockType"`; \}

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

One argument of a custom command as the world parsed it: a string for `String` and `Enum`, a
number for `Integer` and `Float`, a boolean, or the location, entities or type the others name.

***

### ScriptCommandParamType

> **ScriptCommandParamType** = `"BlockType"` \| `"Boolean"` \| `"EntitySelector"` \| `"EntityType"` \| `"Enum"` \| `"Float"` \| `"Integer"` \| `"ItemType"` \| `"Location"` \| `"PlayerSelector"` \| `"String"`

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

A custom command's parameter type, as `CustomCommandParamType` names it.

***

### ScriptCommandResult

> **ScriptCommandResult** = \{ `successCount`: `number`; \} \| \{ `error`: `string`; \}

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

What a command a script ran did: how many times it succeeded, or why it failed.

***

### ScriptCommandSource

> **ScriptCommandSource** = \{ `dimension`: `string`; \} \| \{ `entity`: `string`; \}

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

Who a script's command runs as: a dimension, as the server does, or an entity, as `@s`.

***

### ScriptDebugShapeKind

> **ScriptDebugShapeKind** = `"DebugArrow"` \| `"DebugBox"` \| `"DebugCircle"` \| `"DebugCone"` \| `"DebugCylinder"` \| `"DebugEllipsoid"` \| `"DebugLine"` \| `"DebugPyramid"` \| `"DebugSphere"` \| `"DebugText"`

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

The classes of `@minecraft/debug-utilities`' shapes, by the name the Script API gives each.

***

### ScriptDirection

> **ScriptDirection** = `"Down"` \| `"East"` \| `"North"` \| `"South"` \| `"Up"` \| `"West"`

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

A face of a block, as the Script API's `Direction` names it.

***

### ScriptDisplaySlot

> **ScriptDisplaySlot** = `"BelowName"` \| `"List"` \| `"Sidebar"`

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

A display slot, as `DisplaySlotId` names it.

***

### ScriptEquipmentSlot

> **ScriptEquipmentSlot** = `"Body"` \| `"Chest"` \| `"Feet"` \| `"Head"` \| `"Legs"` \| `"Mainhand"` \| `"Offhand"`

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

An equipment slot, as `EquipmentSlot` names it.

***

### ScriptEventSourceType

> **ScriptEventSourceType** = `"Block"` \| `"Entity"` \| `"NPCDialogue"` \| `"Server"`

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

How a script's `/scriptevent` was sent, as `ScriptEventSource` names it.

***

### ScriptEventValue

> **ScriptEventValue** = `string` \| `number` \| `boolean` \| \{ `entity`: [`ScriptEntityRef`](#scriptentityref); \} \| \{ `entities`: readonly [`ScriptEntityRef`](#scriptentityref)[]; \} \| \{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); \} \| \{ `blocks`: readonly [`ScriptBlockLocation`](#scriptblocklocation)[]; \} \| \{ `permutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); \} \| \{ `item`: [`ScriptItem`](#scriptitem); \} \| \{ `items`: readonly [`ScriptItem`](#scriptitem)[]; \} \| \{ `dimension`: `string`; \} \| \{ `vector`: [`ScriptVector3`](#scriptvector3); \} \| \{ `damageSource`: [`ScriptDamageSource`](#scriptdamagesource); \} \| \{ `effect`: [`ScriptEffect`](#scripteffect); `holder`: `string`; \} \| \{ `json`: `string`; \} \| \{ `at`: [`ScriptBlockLocation`](#scriptblocklocation); `blockComponent`: `string`; \}

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

A value an event of `world.afterEvents` or `world.beforeEvents` carries, as one of its members
reads it: a string, number or boolean as it is, or a wrapper naming what the member makes of it.

#### Union Members

`string`

***

`number`

***

`boolean`

***

##### Type Literal

\{ `entity`: [`ScriptEntityRef`](#scriptentityref); \}

***

##### Type Literal

\{ `entities`: readonly [`ScriptEntityRef`](#scriptentityref)[]; \}

***

##### Type Literal

\{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); \}

***

##### Type Literal

\{ `blocks`: readonly [`ScriptBlockLocation`](#scriptblocklocation)[]; \}

***

##### Type Literal

\{ `permutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); \}

***

##### Type Literal

\{ `item`: [`ScriptItem`](#scriptitem); \}

***

##### Type Literal

\{ `items`: readonly [`ScriptItem`](#scriptitem)[]; \}

***

##### Type Literal

\{ `dimension`: `string`; \}

***

##### Type Literal

\{ `vector`: [`ScriptVector3`](#scriptvector3); \}

***

##### Type Literal

\{ `damageSource`: [`ScriptDamageSource`](#scriptdamagesource); \}

***

##### Type Literal

\{ `effect`: [`ScriptEffect`](#scripteffect); `holder`: `string`; \}

A status effect, and the id of the entity it is on.

***

##### Type Literal

\{ `json`: `string`; \}

Plain data, such as a `NeighborChange` list, as JSON.

***

##### Type Literal

\{ `at`: [`ScriptBlockLocation`](#scriptblocklocation); `blockComponent`: `string`; \}

A block's component, by its class, such as `BlockPistonComponent`, whose object names the block.

***

### ScriptGameEventGuard

> **ScriptGameEventGuard** = (`event`) => [`ScriptGameEventVerdict`](#scriptgameeventverdict)

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

A guard of the actions whose before-events [ScriptGameEvent](#scriptgameevent) describes.

#### Parameters

##### event

[`ScriptGameEvent`](#scriptgameevent)

#### Returns

[`ScriptGameEventVerdict`](#scriptgameeventverdict)

***

### ScriptGameEventVerdict

> **ScriptGameEventVerdict** = \{ `veto`: `true`; \} \| \{ `fields`: `Readonly`\<`Record`\<`string`, [`ScriptEventValue`](#scripteventvalue)\>\>; `veto`: `false`; \}

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

What the scripts decide of a before-event: veto it, or let it go on with the fields they may have changed.

***

### ScriptGameMode

> **ScriptGameMode** = `"Adventure"` \| `"Creative"` \| `"Spectator"` \| `"Survival"`

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

A game mode as the Script API's `GameMode` names it.

***

### ScriptHttpMethod

> **ScriptHttpMethod** = `"Delete"` \| `"Get"` \| `"Head"` \| `"Patch"` \| `"Post"` \| `"Put"`

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

An HTTP method, as `@minecraft/server-net`'s `HttpRequestMethod` names it.

***

### ScriptHttpResult

> **ScriptHttpResult** = \{ `body`: `string`; `headers`: readonly (readonly \[`string`, `string`\])[]; `id`: `number`; `status`: `number`; \} \| \{ `errorCode`: `number`; `id`: `number`; \}

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

How one request ended: the response the server sent, or the error that ended it, by the code
BDS's HTTP client reports, such as 111 for a refused connection.

#### Union Members

##### Type Literal

\{ `body`: `string`; `headers`: readonly (readonly \[`string`, `string`\])[]; `id`: `number`; `status`: `number`; \}

###### body

> `readonly` **body**: `string`

###### headers

> `readonly` **headers**: readonly (readonly \[`string`, `string`\])[]

The response headers in the order they arrived, each name in lower case.

###### id

> `readonly` **id**: `number`

###### status

> `readonly` **status**: `number`

***

##### Type Literal

\{ `errorCode`: `number`; `id`: `number`; \}

***

### ScriptItemHook

> **ScriptItemHook** = [`ScriptItemHookEvent`](#scriptitemhookevent)\[`"hook"`\]

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

The item hooks a custom component can have, as [ScriptItemHookEvent](#scriptitemhookevent) names them.

***

### ScriptItemHookEvent

> **ScriptItemHookEvent** = `object` & (\{ `hook`: `"onUse"` \| `"onCompleteUse"` \| `"onConsume"`; \} \| \{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); `blockFace`: [`ScriptDirection`](#scriptdirection); `faceLocation`: [`ScriptVector3`](#scriptvector3); `hook`: `"onUseOn"`; `usedOnBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); \} \| \{ `hadEffect`: `boolean`; `hitEntity`: [`ScriptEntityRef`](#scriptentityref); `hook`: `"onHitEntity"`; \} \| \{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); `hook`: `"onMineBlock"`; `minedBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); \})

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

An item hook the world raises for the custom components an item names.

#### Type Declaration

##### components

> `readonly` **components**: readonly [`ScriptComponentUse`](#scriptcomponentuse)[]

##### item

> `readonly` **item**: [`ScriptItem`](#scriptitem)

The stack the hook is about, as it was when the world raised it.

##### source

> `readonly` **source**: [`ScriptEntityRef`](#scriptentityref)

The entity using the item.

***

### ScriptParticipantRef

> **ScriptParticipantRef** = \{ `name`: `string`; \} \| \{ `entity`: `string`; \} \| \{ `participant`: `number`; \}

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

Who a scoreboard call names: a fake player by name, an entity by id, or a participant by its id.

***

### ScriptParticipantType

> **ScriptParticipantType** = `"Entity"` \| `"FakePlayer"` \| `"Player"`

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

How a scoreboard participant is known, as `ScoreboardIdentityType` names it.

***

### ScriptProperties

> **ScriptProperties** = `ReadonlyMap`\<`string`, [`ScriptPropertyValue`](#scriptpropertyvalue)\>

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

One pack's dynamic properties of one owner, by id, in the order they were first set.

***

### ScriptPropertyOwner

> **ScriptPropertyOwner** = `"world"` \| \{ `entity`: `string`; \}

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

Whose dynamic properties a script reads or writes: the world's, or an entity's by its id.

***

### ScriptPropertyValue

> **ScriptPropertyValue** = `number` \| `boolean` \| `string` \| [`ScriptVector3`](#scriptvector3)

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

A dynamic property's value as BDS keeps it: a number, which is a double, a boolean, a string, or
a vector whose parts are 32-bit floats.

***

### ScriptSpawnCause

> **ScriptSpawnCause** = `"Born"` \| `"Event"` \| `"Loaded"` \| `"Spawned"` \| `"Transformed"`

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

Why an entity appeared, as `EntityInitializationCause` names it.

***

### ScriptStateValue

> **ScriptStateValue** = `string` \| `number` \| `boolean`

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

A block state's value.

***

### ScriptStructureSaveMode

> **ScriptStructureSaveMode** = `"Memory"` \| `"World"`

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

How a structure is kept, as `StructureSaveMode` names it.

***

### ScriptTitle

> **ScriptTitle** = \{ `kind`: `"title"` \| `"subtitle"` \| `"actionbar"`; `text`: `string`; \} \| \{ `kind`: `"clear"` \| `"reset"`; \} \| \{ `fadeIn`: `number`; `fadeOut`: `number`; `kind`: `"times"`; `stay`: `number`; \}

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

One title instruction, as `/title` sends it to a player.

#### Union Members

##### Type Literal

\{ `kind`: `"title"` \| `"subtitle"` \| `"actionbar"`; `text`: `string`; \}

***

##### Type Literal

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

***

##### Type Literal

\{ `fadeIn`: `number`; `fadeOut`: `number`; `kind`: `"times"`; `stay`: `number`; \}

###### fadeIn

> `readonly` **fadeIn**: `number`

Ticks the title takes to appear.

###### fadeOut

> `readonly` **fadeOut**: `number`

Ticks the title takes to go.

###### kind

> `readonly` **kind**: `"times"`

###### stay

> `readonly` **stay**: `number`

Ticks the title stays.

***

### ScriptTransferTarget

> **ScriptTransferTarget** = \{ `hostname`: `string`; `port`: `number`; \} \| \{ `netherNetId`: `string`; \}

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

Where `@minecraft/server-admin`'s `transferPlayer` sends a player.

***

### ScriptWeather

> **ScriptWeather** = `"Clear"` \| `"Rain"` \| `"Thunder"`

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

The weather as the Script API's `WeatherType` names it.

***

### ScriptWorldEvent

> **ScriptWorldEvent** = `object` & `Omit`\<[`WeatherChangeIntent`](#weatherchangeintent), `"duration"`\> \| \{ `playerId`: `string`; `playerName`: `string`; `type`: `"playerJoin"`; \} \| \{ `initialSpawn`: `boolean`; `playerId`: `string`; `type`: `"playerSpawn"`; \} \| \{ `playerId`: `string`; `playerName`: `string`; `type`: `"playerLeave"`; \} \| \{ `message`: `string`; `sender`: `string`; `type`: `"chatSend"`; \} \| \{ `id`: `string`; `message`: `string`; `sourceEntity?`: `string`; `sourceType`: [`ScriptEventSourceType`](#scripteventsourcetype); `type`: `"scriptEvent"`; \} \| \{ `cause`: [`ScriptSpawnCause`](#scriptspawncause); `entity`: [`ScriptEntityRef`](#scriptentityref); `type`: `"entitySpawn"`; \} \| \{ `damage`: `number`; `entity`: [`ScriptEntityRef`](#scriptentityref); `source`: [`ScriptDamageSource`](#scriptdamagesource); `type`: `"entityHurt"`; \} \| \{ `entity`: [`ScriptEntityRef`](#scriptentityref); `source`: [`ScriptDamageSource`](#scriptdamagesource); `type`: `"entityDie"`; \} \| \{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); `brokenBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); `itemAfter?`: [`ScriptItem`](#scriptitem); `itemBefore?`: [`ScriptItem`](#scriptitem); `player`: `string`; `type`: `"playerBreakBlock"`; \} \| \{ `item`: [`ScriptItem`](#scriptitem); `player`: `string`; `type`: `"itemUse"`; \} \| `object` & [`BlockInteractIntent`](#blockinteractintent) \| `object` & [`EntityInteractIntent`](#entityinteractintent) \| `object` & [`ScriptGameEvent`](#scriptgameevent)

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

A change the world committed, for an after-event.

#### Union Members

`object` & `Omit`\<[`WeatherChangeIntent`](#weatherchangeintent), `"duration"`\>

***

##### Type Literal

\{ `playerId`: `string`; `playerName`: `string`; `type`: `"playerJoin"`; \}

A player joined and their client finished loading into the world.

***

##### Type Literal

\{ `initialSpawn`: `boolean`; `playerId`: `string`; `type`: `"playerSpawn"`; \}

A player appeared in the world, on joining or on respawning.

***

##### Type Literal

\{ `playerId`: `string`; `playerName`: `string`; `type`: `"playerLeave"`; \}

A player left; their entity is already gone.

***

##### Type Literal

\{ `message`: `string`; `sender`: `string`; `type`: `"chatSend"`; \}

A player's chat line went past the guards, and the players it reaches got it.

***

##### Type Literal

\{ `id`: `string`; `message`: `string`; `sourceEntity?`: `string`; `sourceType`: [`ScriptEventSourceType`](#scripteventsourcetype); `type`: `"scriptEvent"`; \}

A `/scriptevent` ran.

###### id

> `readonly` **id**: `string`

###### message

> `readonly` **message**: `string`

###### sourceEntity?

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

The entity that ran it, when an entity did.

###### sourceType

> `readonly` **sourceType**: [`ScriptEventSourceType`](#scripteventsourcetype)

###### type

> `readonly` **type**: `"scriptEvent"`

***

##### Type Literal

\{ `cause`: [`ScriptSpawnCause`](#scriptspawncause); `entity`: [`ScriptEntityRef`](#scriptentityref); `type`: `"entitySpawn"`; \}

An entity appeared in the world.

***

##### Type Literal

\{ `damage`: `number`; `entity`: [`ScriptEntityRef`](#scriptentityref); `source`: [`ScriptDamageSource`](#scriptdamagesource); `type`: `"entityHurt"`; \}

A blow took health off an entity.

###### damage

> `readonly` **damage**: `number`

The health the blow took.

###### entity

> `readonly` **entity**: [`ScriptEntityRef`](#scriptentityref)

###### source

> `readonly` **source**: [`ScriptDamageSource`](#scriptdamagesource)

###### type

> `readonly` **type**: `"entityHurt"`

***

##### Type Literal

\{ `entity`: [`ScriptEntityRef`](#scriptentityref); `source`: [`ScriptDamageSource`](#scriptdamagesource); `type`: `"entityDie"`; \}

An entity died.

***

##### Type Literal

\{ `block`: [`ScriptBlockLocation`](#scriptblocklocation); `brokenBlockPermutation`: [`ScriptBlockPermutation`](#scriptblockpermutation); `itemAfter?`: [`ScriptItem`](#scriptitem); `itemBefore?`: [`ScriptItem`](#scriptitem); `player`: `string`; `type`: `"playerBreakBlock"`; \}

A player broke a block.

###### block

> `readonly` **block**: [`ScriptBlockLocation`](#scriptblocklocation)

###### brokenBlockPermutation

> `readonly` **brokenBlockPermutation**: [`ScriptBlockPermutation`](#scriptblockpermutation)

###### itemAfter?

> `readonly` `optional` **itemAfter?**: [`ScriptItem`](#scriptitem)

The stack in the player's hand after the break. Absent for an empty hand.

###### itemBefore?

> `readonly` `optional` **itemBefore?**: [`ScriptItem`](#scriptitem)

The stack in the player's hand before the break. Absent for an empty hand.

###### player

> `readonly` **player**: `string`

###### type

> `readonly` **type**: `"playerBreakBlock"`

***

##### Type Literal

\{ `item`: [`ScriptItem`](#scriptitem); `player`: `string`; `type`: `"itemUse"`; \}

A player used an item that the before-event let through.

***

`object` & [`BlockInteractIntent`](#blockinteractintent)

A player's click on a block went past the before-event and did something.

***

`object` & [`EntityInteractIntent`](#entityinteractintent)

A player's click on an entity went past the before-event and did something.

***

`object` & [`ScriptGameEvent`](#scriptgameevent)

One of the other events of `world.afterEvents`, which [ScriptGameEvent](#scriptgameevent) describes.

***

### SimulatedPlayerAction

> **SimulatedPlayerAction** = \{ `kind`: `"chat"`; `message`: `string`; \} \| \{ `kind`: `"jump"`; \} \| \{ `kind`: `"move"`; `relative`: `boolean`; `speed`: `number`; `x`: `number`; `z`: `number`; \} \| \{ `kind`: `"stopMoving"`; \} \| \{ `kind`: `"lookAt"`; `location`: [`ScriptVector3`](#scriptvector3); \} \| \{ `kind`: `"attack"`; \} \| \{ `entity`: `string`; `kind`: `"attackEntity"`; \} \| \{ `item`: [`ScriptItem`](#scriptitem); `kind`: `"useItem"`; \} \| \{ `kind`: `"breakBlock"`; `location`: [`ScriptVector3`](#scriptvector3); \}

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

What a script tells a GameTest simulated player to do. Each is what a client's input would do
for a real player, and a move or a look lasts until another replaces it.

#### Union Members

##### Type Literal

\{ `kind`: `"chat"`; `message`: `string`; \}

Types a line of chat, which goes past the chat guards as a client's line does.

***

##### Type Literal

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

Jumps, when the player stands on the ground.

***

##### Type Literal

\{ `kind`: `"move"`; `relative`: `boolean`; `speed`: `number`; `x`: `number`; `z`: `number`; \}

Walks in a direction until told to stop: `x` toward the east and `z` toward the south, or,
when `relative`, `x` to the player's left and `z` forward from where they face.

***

##### Type Literal

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

***

##### Type Literal

\{ `kind`: `"lookAt"`; `location`: [`ScriptVector3`](#scriptvector3); \}

Turns the player's head and body to face a location.

***

##### Type Literal

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

Swings at the entity the player faces within reach.

***

##### Type Literal

\{ `entity`: `string`; `kind`: `"attackEntity"`; \}

Swings at one entity, when it is within reach.

***

##### Type Literal

\{ `item`: [`ScriptItem`](#scriptitem); `kind`: `"useItem"`; \}

Uses an item in the air, as a client's right click does.

***

##### Type Literal

\{ `kind`: `"breakBlock"`; `location`: [`ScriptVector3`](#scriptvector3); \}

Breaks a block, through the guards a client's break goes through, retrying each tick while one vetoes it.

***

### VetoGuard

> **VetoGuard**\<`Intent`\> = (`intent`) => [`VetoVerdict`](#vetoverdict)

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

A guard that can veto an action but not change it.

#### Type Parameters

##### Intent

`Intent`

#### Parameters

##### intent

`Intent`

#### Returns

[`VetoVerdict`](#vetoverdict)

## Functions

### shapeVisibleTo()

> **shapeVisibleTo**(`shape`, `player`): `boolean`

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

Whether a player sees a debug shape, as its `visibleTo`, `hiddenFrom` and `defaultVisibleToAll` say.

#### Parameters

##### shape

[`ScriptDebugShape`](#scriptdebugshape)

##### player

`string`

#### Returns

`boolean`
