Commands/attack

From Minecraft Wiki
Jump to: navigation, search
attack
Restrictions

None

Information icon.svg
This feature is exclusive to Bedrock Edition and Education Edition.
Hydrogen.png
This page describes an education-related feature.
This feature is available only in Education Edition or when enabling the "Education Edition" option in Bedrock Edition.

Let your agent attack in the direction specified.

Syntax[edit]

attack <direction: string>

Arguments[edit]

direction: string

Specifies the direction of Agent to attack.
Must be one of:
  • forward to attack forward.
  • back to attack backward.
  • left to attack leftward.
  • right to attack rightward.
  • up to attack upward.
  • down to attack downward.

Result[edit]

Always success, Agent attacks in the specified direction by 8♥♥♥♥ attack damage.