Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Minecraft Wiki
Advertisement
Information icon
此特性為教育版基岩版獨有。
agent
需要的權限等級

0[僅教育版]
1[僅基岩版]

限制條件

Agent控制指令,僅允許被玩家所連接的WebSocket端執行,玩家無法直接在遊戲中執行該指令。

語法[]

agent <command: AgentDirectionCommand> <direction: AgentDirection>
agent <command: AgentItemCommand> <slotNum: int>
agent <command: AgentCommand>
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 tp <destination: x y z> facing <lookAtPosition: x y z>
agent transfer <slotNum: int> <quantity: int> <dstSlotNum: int>
agent turn <direction: AgentTurnDirection>

參數[]

command: AgentDirectionCommand包括move|destroy|detect|attack|detectredstone|dropall|inspect|inspectdata|interact|till
command: AgentItemCommand包括getitemcount|getitemspace|getitemdetail
command: AgentCommand包括create|getposition
direction: AgentDirection包括up|down|forward|back|left|right
direction: AgentTurnDirection包括left|right

slotNum: int

指定要改變的智慧體物品欄欄位。有效值為0至26的整數。

item: Item

指定要給予或收集到物品欄欄位內的物品。必須為物品ID,或具有物品形態的方塊的ID

quantity: intcount: int

指定被丟出、給予或移動的物品數量。

aux: int

指定參與指令的物品的資料值。

destination: x y z

指定要被傳送到的座標。
必須為三維座標,元素為浮點數。允許波浪號與插入符標記

y-rot: float

指定傳送後智慧體的水平旋轉角度。

lookAtPosition: x y z

指定傳送後智慧體朝向的位置。
必須為三維座標,元素為浮點數。允許波浪號與插入符標記

dstSlotNum: int

指定目標物品欄欄位。

歷史[]

關於「指令/agent」的歷史,請見各版本頁面。


關於「指令/agent」的歷史,請見各版本頁面。


關於「指令/agent」的歷史,請見各版本頁面。


關於「指令/agent」的歷史,請見各版本頁面。


關於「指令/agent」的歷史,請見各版本頁面。


你知道嗎[]

  • 雖然玩家無法在遊戲中直接執行/agent指令,但是可以透過NPC執行。

參見[]

語言

Advertisement