/setblock

Changes a block to another block.

Operator (cheats on)Cheats must be onChecked on 1.26.66.1

Open the setblock command generator →

Syntax

Exactly as the game prints it. <angle brackets> are required, [square brackets] are optional.

/setblock <position: x y z> <tileName: Block> <blockStates: block states> [replace|destroy|keep]
/setblock <position: x y z> <tileName: Block> [replace|destroy|keep]
/setblock <position: x y z> <tileName: Block> [tileData: int] [replace|destroy|keep]

Accepted values

SetBlockMode

replacedestroykeep

What we found when testing

Notes from running this command on a real Bedrock Dedicated Server (1.26.66.1).

"Cannot place block outside of the world" also means the chunk is not loaded

On a server with no players nearby, /setblock and /fill at perfectly valid coordinates answer "Cannot place block outside of the world". The coordinates are fine: the chunk is simply not loaded. Adding a ticking area over the spot makes the same command work.

/tickingarea add circle 0 0 0 4 lab
/setblock 0 -60 0 diamond_block

More from 9Minecraft

Command reference © 2026 9Minecraft.net. Syntax read from Minecraft Bedrock Edition 1.26.66.1.