Minecraft:Commands/agent
From SAS Gaming Wiki
More actions
Template: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 Template:Cmd 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>
… 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 offorward|back|left|right|up|down
<turnDirection>is one ofleft|right
History
Bedrock Edition
Minecraft Education
See also
Minecraft:ja:コマンド/agent Minecraft:pt:Comandos/agent Minecraft:zh:命令/agent