All commands
โฌ›
AdvancedJava โœ“Bedrock โœ“

/setblock

Drop a single block at an exact spot - even ones you can't craft.

Overview

What is the /setblock command?

The /setblock command places a single block at exact coordinates, with options to keep, replace or destroy what's already there. It's the precise counterpart to /fill โ€” perfect for one redstone component, a command block, or scripted single-block changes.

It's a building block (literally) of clocks, contraptions and map mechanics that toggle blocks on and off.

When to use it: Use /setblock to place exactly one block at a known position โ€” ideal for redstone, command blocks and scripted toggles.

At a glance

Syntax

Syntax
/setblock <x> <y> <z> <block>
commandtargetcoordsvaluerequiredoptional

See it

What it does

One block at an exact spot

Anatomy

Every part, explained

  1. 1
    /setblockCommandRequired

    Places one block at a position.

  2. 2
    <x> <y> <z>PositionRequired

    Where to place it. ~ means 'here'.

  3. 3
    <block>BlockRequired

    The block id, e.g. stone, chest, command_block.

Your turn

Try it yourself

Playground
5 tokens ยท press Enter to run

Copy & paste

Examples

/setblock ~ ~ ~ stone

A stone block at your feet.

/setblock ~ ~1 ~ chest

A chest right above you.

/setblock 0 64 0 diamond_block

Mark the world origin.

Avoid these

Common mistakes

โœ•/setblock stone
โœ“/setblock ~ ~ ~ stone

Coordinates are required - all three of them.

โœ•/setblock ~ ~ ~ stones
โœ“/setblock ~ ~ ~ stone

Block ids are singular - 'stone'.

Good to know

Frequently asked questions

How do you place a block with a command?
Run /setblock <x> <y> <z> <block>, e.g. /setblock ~ ~ ~ redstone_block.
How do you place a block with specific properties?
Add block states in square brackets, e.g. /setblock ~ ~ ~ oak_stairs[facing=east].
What's the difference between /setblock and /fill?
/setblock changes one block; /fill changes an entire cuboid region between two corners.

Keep going

Related commands