On this page 6 sections
At a glance
Chat examples — below
-
Place a Diamond block above yourself
/setblock ~ ~1 ~ diamond_block
Changes a block to another block. Requires enabled cheats. In Java, a similar command is — /setblock, but is stored differently.
/setblock <position> <tileName> <blockStates> [oldBlockHandling]/setblock <position> <tileName> [oldBlockHandling]
In angular brackets — what must be written; in square brackets — optional. Words without brackets are written as-is.
| Parameter | What to write |
|---|---|
position | x, y, z coordinates (can use ~ and ^) |
tileName | block ID, for example stone (total 2648) |
blockStates | block state in square brackets |
oldBlockHandling | one of: replace, destroy, keep |
| What | Value |
|---|---|
| The command | /setblock |
| Who can | operator and command block |
| Cheats are required | yes |
| Variants of recording | 2 |
| In Java | /setblock |
What does /setblock do in Bedrock?
Changes a block to another block.
Why doesn't /setblock work?
Commands require cheats: they are enabled in the world settings — after which achievements in this world are no longer awarded. This command can be executed by the world host or a command block.
What is different about /setblock in Bedrock compared to Java?
In Java, there is a /setblock command, but it is written differently: each edition has its own parameters, names, and order. The Java command will not work as-is in Bedrock.
All Bedrock commands /setblock in JavaBedrock serversHow to enable cheats
Minecraft Bedrock 1.26.50.4 data: commands, parameters, and descriptions — from Mojang's official bedrock-samples repository.