/execute as @s run say HelloThe /execute command runs other commands with a modified context: who runs it, where, and under what conditions. This builder assembles the chain visually, so you add as, at, positioned, if, unless, store and run step by step and copy syntax that always parses.
The /execute command is the most powerful command in Java Edition. It does nothing by itself. Instead it modifies the execution context before running another command, so a single chain can replace dozens of separate commands.
The hard part is the syntax. One chain can easily exceed 200 characters, and a single misplaced keyword breaks the whole command. The builder above removes that risk with dropdowns, fields, and a live preview. The maxCommandForkCount gamerule (default 65,536) caps how many execution contexts one chain can create.
1. Add subcommands in the order you need them. Each one modifies the execution context for everything that follows.
2. Configure each subcommand: entity selectors, coordinates, conditions, and score comparisons.
3. Set the run command: the final command that executes with the modified context, at the end of the chain.
4. Copy the assembled chain and paste it into chat or a command block.
| Subcommand | What It Changes |
|---|---|
| as | Executing entity (who) |
| at | Position, rotation, dimension |
| positioned | Position only |
| rotated | Rotation only |
| facing | Rotation to face a point |
| anchored | Anchor point (eyes or feet) |
| in | Dimension |
| if / unless | Conditional execution |
| store | Saves result or success to data |
| run | Final command to execute |
Key concept: as changes who runs the command (the entity); at changes where it runs (position and rotation). Use as @e at @s together to run a command as each entity at that entity's own location. Subcommands process left to right, so order matters.
The /execute command runs other commands with a modified execution context. It lets you change who runs the command (as), where it runs (at, positioned), add conditions (if, unless), store results in scoreboards or NBT (store), and more. It does nothing alone and always ends with a run subcommand that specifies the actual action.
The as subcommand changes the executing entity (who runs the command) without changing position. The at subcommand changes the execution position, rotation, and dimension to match the target entity without changing who is executing. Use as @e at @s together to run a command as each entity at its own position.
The store subcommand saves the result or success value of the executed command into a scoreboard objective, NBT path, bossbar, or block and entity data. For example, execute store result score @s health run data get entity @s Health stores the entity's health into a scoreboard objective.
The maxCommandForkCount gamerule defaults to 65,536. It limits how many execution contexts a single /execute command can create. If you run execute as @e and there are more entities than this limit, the command fails. The maxCommandChainLength gamerule, also 65,536 by default, limits total commands in a chain or function.
Subcommands are processed left to right, and each one modifies the context for everything that follows. That means as @e at @s is not the same as at @s as @e. Build your chain in the order the context needs to change: pick the entity first, then position at it, then add conditions, then run the final command.
Browse more Minecraft tools: