
/setblock
Places a single block. Its basic form is /setblock <pos> <block>; it has 5 syntax forms and 2 arguments. Permission: Cheats / op 2.
/setblock syntax
Game dataEvery form the game accepts. Words in <angle brackets> are arguments you fill in; everything else is typed as is.
/setblock <pos> <block>/setblock <pos> <block> destroy/setblock <pos> <block> keep/setblock <pos> <block> replace/setblock <pos> <block> strict/setblock examples
Ready-to-paste examples (cheats on). @s is you, @p the nearest player, @a everyone, @e every entity.
/setblock ~ ~ ~ minecraft:chest- Places a chest where you stand.
/setblock ~ ~-1 ~ minecraft:diamond_block replace- Turns the block under you into a diamond block.
/setblock arguments
What each argument expects, with the limits the game enforces.
| Argument | Expects | Limits |
|---|---|---|
<pos> | Block coordinates (x y z, ~ relative, ^ local) | — |
<block> | Block ID with optional [states] | — |
Places a single block. It has 5 syntax forms and can be run by: Cheats / op 2.
See Also
Help us maintain accuracy! If you notice incorrect stats, missing data, or any issues, your feedback directly improves the quality of our data for the entire community.
/setblock FAQ (Java 26.3)
What does /setblock do in Minecraft?
Places a single block.
What is the syntax of /setblock?
The basic form is /setblock <pos> <block>. All forms are listed above.
What is an example of /setblock?
/setblock ~ ~ ~ minecraft:chest — Places a chest where you stand.
Do you need cheats for /setblock?
Yes: Cheats / op 2. In singleplayer turn on Allow Cheats (or open to LAN with cheats).