Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/agent

From SAS Gaming Wiki
Revision as of 20:08, 9 April 2026 by SyncBot (talk | contribs) (Fix template calls: add MC/ prefix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Script error: No such module "Exclusive". Template:Infobox command

/agent is a command used to control an Minecraft:agent. Agent control commands are only allowed to be executed by the WebSocket side to which the player is connected, and the player cannot execute the command directly in the game unless you use an NPC. The

  1. REDIRECT Template:Command

Template:Redr command can be run using an NPC.

If a player summons an agent using an NPC then the only way to remove it from their world is by using an NBT Editor and deleting the actorprefix file for that agent.

Syntax

agent . . .
  • … move <direction>
Moves an agent in a specified direction.
  • … turn <turnDirection>
Rotates an agent in a specified direction by 90 degrees.
  • … attack <direction>
Makes an agent attack in a specified direction.
  • … destroy <direction>
Makes an agent destroy a block or item in a specified direction.
  • … drop <int:slotNum> <int:quantity> <direction>
Makes an agent drop specified inventory slot numbered items in a specified quantity in a specified direction.
  • … dropall <direction>
Makes an agent drop all its items from all slots onto the ground by one block in a specified direction.
  • … inspect <direction>
Makes an agent return the name of the block in a specified direction.
  • … inspectdata <direction>
Makes an agent returns the data value of the block of a specified direction.
  • … detect <direction>
Makes an agent detect if there is a collidable block in a specified direction.
  • … detectredstone <direction>
Makes an agent detect a redstone signal of a specified direction.
  • … transfer <int:srcSlotNum> <int:quantity> <int:dstSlotNum>
Transfers a specified quantity of items from one slot to another of an agent's inventory.
  • … create
Creates an agent at the current player's position.
  • … tp <coordinates>
Teleports an agent to a specified position.
  • … collect <string:item>
Makes an agent collect all items within a one block from agent in three dimensions.
  • … till <direction>
Makes an agent till grass in a specified direction.
  • … place <int:slotNum> <direction>
Makes an agent place a block in a specified direction.
  • … setitem <int:slotNum> <int:quantity> <int:amount> <int:data>
<more information needed></more information needed>
  • … getitemcount <int:slotNum>
Makes an agent return the number of items in a specified slot, as in how many the player could use before it would be empty.
  • … getitemspace <int:slotNum>
Makes an agent return the number of spaces remaining in a specified slot, as in the number of items you could add before it would be full.
  • … getitemdetail <int:slotNum>
Makes an agent return the name of the item in a specified slot.
  • … getposition
Makes an agent retrieve its position in the world.

Parameters

<direction> is one of forward|back|left|right|up|down
<turnDirection> is one of left|right

History

Bedrock Edition

Template:HistoryTable

Minecraft Education

Template:HistoryTable

See also

Navigation

All editions
Removed
Template:El only
Debug
Removed
Template:Els only
Template:El only
Removed
Template:El only
Removed
Template:Els only
Removed
Joke
Related

ja:コマンド/agent pt:Comandos/agent zh:命令/agent