跳转到正文

queries API ​

完整接口目录 · 命令与计分板用法 · 工具包下载

模块说明 ​

text
Bounded native read intents; submit/wait through ctx.operations.

Queries ​

python
class Queries

Queries.__init__ ​

python
def __init__(self, operations: Operations)

Queries.entities ​

python
def entities(
    self,
    *,
    idempotency_key: str,
    deadline: str,
    target: str = 'players',
    name: str | None = None,
    entity_type: str | None = None,
    tag: str | None = None,
    origin = None,
    radius: float | None = None,
    limit: int = 64,
) -> OperationIntent

Queries.region ​

python
def region(self, pos, size, *, idempotency_key: str, deadline: str) -> OperationIntent

Queries.block ​

python
def block(self, pos, *, idempotency_key: str, deadline: str) -> OperationIntent

Queries.inventory ​

python
def inventory(
    self,
    window_id: int,
    slot: int,
    *,
    idempotency_key: str,
    deadline: str,
) -> OperationIntent

SDK 说明:

text
Read the robot's cached slot, not another player's inventory.

Queries.observe_inventory ​

python
def observe_inventory(
    self,
    window_id: int,
    *,
    idempotency_key: str,
    deadline: str,
) -> OperationIntent

SDK 说明:

text
Read native self inventory evidence without requesting a refresh.

Windows are main (0), offhand (119), and armour (120). Preserve unknown
slots and the returned connection/revision; a read does not renew them.

Queries.item_stack_responses ​

python
def item_stack_responses(
    self,
    *,
    idempotency_key: str,
    deadline: str,
    after = None,
    limit: int = 8,
) -> OperationIntent

SDK 说明:

text
Read partial inbound ItemStackResponse history, not full NBT or completion proof.

Cursor revision is a decimal string; keep the returned connection binding.

Neomega · 使用、开发与参考文档