Перейти к основному содержимому

Interface: Dimension

A live Minecraft dimension exposed through a QuestScript-owned facade.

Properties

id

readonly id: string

Canonical Java Edition dimension identifier.

Methods

fillBlocks()

fillBlocks(volume, block, options?): FillBlocksResult

Fills an inclusive volume, subject to the bounded-operation limit.

Parameters

volume

BlockVolume

block

string

options?

FillBlocksOptions | null

Returns

FillBlocksResult


getBlock()

getBlock(location): Block

Returns the block at a loaded, valid location.

Parameters

location

Vector3Like

Returns

Block


getEntities()

getEntities(options?): readonly Entity[]

Returns entities in this dimension matching the supported filters.

Parameters

options?

EntityQueryOptions | null

Returns

readonly Entity[]


getPlayers()

getPlayers(options?): readonly Player[]

Returns players in this dimension matching the supported filters.

Parameters

options?

EntityQueryOptions | null

Returns

readonly Player[]


runCommand()

runCommand(command): RunCommandResult

Administrative command execution. The release contract requires an operator grant of command.execute to this Script. Known runtime defect: capability enforcement is not implemented yet.

Parameters

command

string

Returns

RunCommandResult


setBlockType()

setBlockType(location, typeId): void

Replaces one block with the default state of a block type.

Parameters

location

Vector3Like

typeId

string

Returns

void


spawnEntity()

spawnEntity(typeId, location): Entity

Spawns an entity and returns its live facade.

Parameters

typeId

string

location

Vector3Like

Returns

Entity


spawnItem()

spawnItem(itemStack, location): Entity

Spawns a detached stack as an item entity.

Parameters

itemStack

ItemStack

location

Vector3Like

Returns

Entity