Protocol: Dimension
A live Minecraft dimension exposed through a QuestScript-owned facade.
class Dimension(Protocol)
Related API: Block, BlockVolume, Entity, FillBlocksResult, ItemStack, Player, RunCommandResult, Vector3Like
Properties
id
@property
def id(self) -> str:
Canonical Java Edition dimension identifier.
Methods
get_block
def get_block(self, location: Vector3Like) -> Block:
Return the block at a loaded, valid location.
Related API: Block, Vector3Like
set_block_type
def set_block_type(self, location: Vector3Like, type_id: str) -> None:
Replace one block with the default state of a block type.
Related API: Vector3Like
fill_blocks
def fill_blocks(self, volume: BlockVolume, block: str, *, max_blocks: int=...) -> FillBlocksResult:
Fill an inclusive volume, subject to the bounded-operation limit.
Related API: BlockVolume, FillBlocksResult
get_players
def get_players(self, *, type: Optional[str]=..., tags: Optional[Sequence[str]]=..., location: Optional[Vector3Like]=..., min_distance: Optional[float]=..., max_distance: Optional[float]=...) -> Sequence[Player]:
Return players in this dimension matching the supported filters.
Related API: Player, Vector3Like
get_entities
def get_entities(self, *, type: Optional[str]=..., tags: Optional[Sequence[str]]=..., location: Optional[Vector3Like]=..., min_distance: Optional[float]=..., max_distance: Optional[float]=...) -> Sequence[Entity]:
Return entities in this dimension matching the supported filters.
Related API: Entity, Vector3Like
spawn_entity
def spawn_entity(self, type_id: str, location: Vector3Like) -> Entity:
Spawn an entity and return its live facade.
Related API: Entity, Vector3Like
spawn_item
def spawn_item(self, item_stack: ItemStack, location: Vector3Like) -> Entity:
Spawn a detached stack as an item entity.
Related API: Entity, ItemStack, Vector3Like
run_command
def run_command(self, command: str) -> RunCommandResult:
Execute an administrative command.
The release contract requires an operator grant of command.execute.
Known runtime defect: capability enforcement is not implemented yet.
Related API: RunCommandResult