Skip to main content

/setblock

Places a block at a specified position in the world. Can optionally destroy the existing block, keep it, or replace it.

Category
World
Permission Level
Game Master
Version Added
1.0

Syntax

/setblock <pos> <block> [destroy|keep|replace]

Parameters

NameTypeRequiredDescription
posblock_posRequiredThe coordinates where the block should be placed.
blockblock_stateRequiredThe block to place, optionally with block states (e.g., oak_stairs[facing=east]).
modeliteralOptionaldestroy = drops old block as item; keep = only places if target is air; replace = overwrites (default).

Examples

/setblock ~ ~-1 ~ minecraft:diamond_block

Places a diamond block directly below you.

/setblock 0 64 0 minecraft:oak_stairs[facing=south,half=top] destroy

Places a top-half south-facing oak stair at 0,64,0, destroying whatever was there.

/setblock ~ ~ ~ air

Removes the block at your position by replacing it with air.

Common Mistakes

Notes

Block states are specified in square brackets, e.g., chest[facing=north]. Use /setblock with air to effectively delete a block.

Related Commands

Need a Minecraft server?

Try these commands on Astroworld or host your own server.

Try Astroworld Hosting