Skip to content
GamerTools
English

Command Generator for Minecraft

Generate /tp, /setblock and /fill commands with target selectors, coordinates and block states, and copy them straight into your world.

Who to teleport
More selector options
Distance (radius)
XP level
Vertical rotation
Horizontal rotation
Start position and volume
Destination

Use a number, ~ (relative) or ^ (local). Empty means ~.

Your command

Information

Minecraft commands are powerful but easy to get wrong: one missing tilde or a mistyped selector and nothing happens. The Command Generator builds the command for you. Choose who to teleport or which blocks to place, fill in coordinates and options, and copy the finished command. The generator checks your input and tells you in plain words what is wrong instead of giving you a command that fails.

Examples

How do I teleport the nearest player 10 blocks up?

Choose the Teleport command, keep the target on Nearest player and enter ~ ~10 ~ as the destination. The result is /tp @p ~ ~10 ~. The ~ symbols mean relative to the current position, so ~10 is 10 blocks higher.

How do I fill an area with glass that is empty inside?

Choose Fill, enter the two corners, pick glass as the block and choose the hollow mode. You get a command such as /fill ~ ~ ~ ~5 ~5 ~5 minecraft:glass hollow, which builds a glass box with an empty inside.

Frequently asked questions

What is a target selector?

A target selector says which players or entities a command applies to. @p is the nearest player, @r a random player, @a all players, @e all entities and @s the one who runs the command. Between square brackets you can narrow it down, for example @e[type=minecraft:zombie,limit=3,sort=nearest] for the three nearest zombies.

What do ~ and ^ mean in coordinates?

A plain number is an exact position in the world. A tilde (~) means relative to where the command runs, so ~ is the same spot and ~5 is five blocks further along that axis. A caret (^) means local coordinates, relative to where the executor is looking. You cannot mix ^ with other coordinates in one command.

What is the difference between replace, destroy, keep, hollow and outline?

With replace, the new block replaces whatever is there. Destroy does the same but breaks the old blocks as if they were mined, so their items drop. Keep only places blocks where there is air. For /fill, hollow makes only the outer layer of the area solid and clears the inside, while outline only changes the outer layer and leaves the inside as it was.

Why does /fill say the area is too big?

One /fill command can change at most 32768 blocks. That is a cube of 32 by 32 by 32 blocks. For larger areas, use several commands next to each other. The generator warns you when your area is too big.

Where do I enter the command?

Open the chat in your world and paste the command, including the slash. Cheats must be enabled in the world, or you need operator permissions on a server. You can also paste the command into a command block.

Does this work on Bedrock Edition?

The commands are written for Minecraft Java Edition. Bedrock Edition uses a slightly different syntax for target selectors and for some commands, so a command from here may not work there.

More tools