Cobblestone block

Minecraft Setblock and Fill Command Generator

A /fill is a /setblock with a second corner and a mode. The mode is what people get wrong: replace overwrites everything, keep only fills air, hollow and outline leave the interior alone. Choose the block, its state and NBT here, then pick the mode deliberately.

  • setblock and fill from one editor
  • Block states and block-entity NBT
  • replace, destroy, keep, hollow and outline modes

Example commands

Setblock at exact coordinates

/setblock ~ ~ ~ minecraft:stone

One block placed precisely; swap the mode to keep or destroy to change how existing blocks are treated.

Hollow room in one command

/fill 0 64 0 10 68 10 minecraft:oak_planks hollow

hollow builds the shell and clears the interior -- an instant room.

Clear a volume

/fill ~-5 ~ ~-5 ~5 ~5 ~5 minecraft:air

Filling with air is the standard bulk-delete.

FAQ

What is the difference between the fill modes?

replace overwrites every block in the region; destroy also drops the broken blocks as items; keep only fills air and leaves existing blocks; hollow fills just the outer shell with air inside; outline fills only the edges. Picking the wrong mode is the most common /fill mistake.

Why does my /fill command say "Too many blocks"?

A single /fill is capped at 32,768 blocks by default. Split a larger area into several /fill commands, or raise the commandModificationBlockLimit gamerule on versions that expose it.

How do I setblock a chest with items already inside?

Add block-entity NBT to the block. /setblock ... chest{Items:[...]} places the chest pre-filled. The editor lets you build the block state and NBT so you do not hand-write the braces.

How do I place a block facing a direction?

Set the relevant block state, such as facing=north on stairs or axis=y on logs. The generator appends the [state=value] block-state string that controls orientation.