手冊:/agent

出自Minecraft基岩版开发Wiki
agent
用法旗標
普通命令(0)
可見性旗標
隱藏(6)
同步旗標
同步命令(0)
執行旗標
允許執行(0)
型別旗標
無型別(0)
作弊旗標
作弊命令(0)
遊戲內描述

commands.agent.description

僅玩家所連接的WebSocket和開發人員版可執行

/agent命令用於操縱智慧體

語法[編輯]

agent <command: AgentCommand>

agent <command: AgentDirectionCommand> <direction: AgentDirection>

agent <command: AgentItemCommand> <slotNum: int>

子命令[編輯]

agent collect <item: Item>

agent collect all

agent drop <slotNum: int> <quantity: int> <direction: AgentDirection>

agent place <slotNum: int> <direction: AgentDirection>

agent setitem <slotNum: int> <item: Item> <count: int> <aux: int>

agent tp [destination: x y z] [y-rot: float]

agent transfer <slotNum: int> <quantity: int> <dstSlotNum: int>

agent turn <direction: AgentTurnDirection>

參數[編輯]

command
AgentCommand型別,
command
AgentDirectionCommand型別,
command
AgentItemCommand型別,
direction
AgentDirection型別,
direction
AgentTurnDirection型別,
slotNum
int型別,
dstSlotNum
int型別,
quantity
int型別,
item
Item型別,
count
int型別,
aux
int型別,
destination
x y z型別,
y-rot
float型別,

效果[編輯]

命令觸發條件執行結果
任意參數未正確指定失敗
執行成功在指定了有效的命令名,正常給出了命令的用法時

輸出[編輯]

命令執行結果成功次數增量
任意失敗0

響應[編輯]

WebSocket[編輯]

  • :根物件
    •  header:報文訊息的頭。
      •  messagePurpose:該條報文訊息的傳送目的,對於命令響應恆為commandResponse
      •  requestId:造成該響應的請求報文的UUID。
      •  version:該報文的版本。
    •  body:報文訊息的內容。
      •  statusCode:該響應的狀態碼。
      •  statusMessage:該響應的狀態訊息,對於命令響應為該命令的執行意見回饋文字。

Manual:/agent/response

範例[編輯]

腳本API[編輯]

  • :根物件
    •  statusCode:該響應的狀態碼。
    •  statusMessage:該響應的狀態訊息,對於命令響應為該命令的執行意見回饋文字。

Manual:/someCommand/response

範例[編輯]

歷史[編輯]

攜帶版
1.0.0?加入了/agent
教育版
?加入了/agent

畫廊[編輯]

Template:Navbox commands