News
Game
Guides
Downloads
Versions
Best building commands in Minecraft
COMMANDSCOPY & PASTEJAVA 26.3

Best building commands in Minecraft

These commands place, copy and replace blocks by the thousand, so you can lay a floor, raise walls or clear a lake in seconds. The last ones keep the light steady and stop mobs from wrecking your work.

Before you pasteCheats must be on. Commands longer than 256 characters only work in a command block.

The commands

Lay a stone brick floor

/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stone_bricks

Covers an 11 by 11 square under your feet with stone bricks.

Java 26.3 40 characters · chat OK

Build a hollow glass box

/fill ~-4 ~ ~-4 ~4 ~6 ~4 glass hollow

Glass walls, floor and roof with air inside, around where you stand.

Java 26.3 37 characters · chat OK

Frame a room without clearing it

/fill ~-4 ~ ~-4 ~4 ~6 ~4 oak_planks outline

Same box in planks, but whatever is inside stays in place.

Java 26.3 43 characters · chat OK

Drain water from an area

/fill ~-10 ~-5 ~-10 ~10 ~5 ~10 air replace water

Turns every water block nearby into air, handy for underwater builds.

Java 26.3 48 characters · chat OK

Turn dirt into grass

/fill ~-10 ~-1 ~-10 ~10 ~-1 ~10 grass_block replace dirt

Swaps only the dirt of the layer under you, other blocks stay.

Java 26.3 56 characters · chat OK

Copy a build without air

/clone ~ ~ ~ ~10 ~10 ~10 ~20 ~ ~ masked

Copies an 11 block cube 20 blocks east, skipping air blocks.

Java 26.3 39 characters · chat OK

Place upside down stairs

/setblock ~ ~ ~2 oak_stairs[facing=north,half=top]

A stair facing north and flipped, for eaves and ceilings.

Java 26.3 50 characters · chat OK

Hide a light source

/setblock ~ ~3 ~ light[level=15]

An invisible light block at full brightness above you.

Java 26.3 32 characters · chat OK

Paint the land with a biome

/fillbiome ~-16 ~-16 ~-16 ~16 ~16 ~16 cherry_grove

Turns the area into Cherry Grove: grass and water colors change.

Java 26.3 50 characters · chat OK

Stop creepers from breaking blocks

/gamerule mob_griefing false

Mobs can no longer destroy or pick up blocks.

Java 26.3 28 characters · chat OK

Freeze the time of day

/gamerule advance_time false

The sun stops moving, so the light stays the same.

Java 26.3 28 characters · chat OK

Set full daylight

/time set noon

Jumps to noon, the brightest moment of the day.

Java 26.3 14 characters · chat OK

How to use them

The ~ coordinates are relative to where you stand, so stand where you want the build before you paste. /fill takes two opposite corners, then the block. Its last word changes the result: hollow builds walls with air inside, outline builds walls and keeps what is inside, replace only swaps one block for another.

Tips

  • Press F3 to read your exact coordinates before typing fixed ones.
  • /clone with masked skips air, so it never erases what is around the copy.
  • Block states go in square brackets with /setblock, for stairs, logs or doors.
  • /fillbiome changes grass, leaves and water colors without touching blocks.

Common errors

Too many blocks in the specified area means the area is above the limit, 32,768 blocks by default; split it into smaller boxes or raise the max_block_modifications rule with /gamerule. No blocks were filled means every block was already the one you asked for.

✓ Checked in Java Edition 26.3 · updated 2 November 2026

FAQ

How do I undo a /fill?

There is no undo. Before a big change, copy the area elsewhere with /clone, or keep a backup of the world.

What is the difference between hollow and outline?

Both build the shell of the box. hollow also fills the inside with air, outline leaves the inside untouched.

Commands used on this page

/fillFill a cuboid area with blocks/cloneCopy an area of blocks to another place/setblockPlace or replace a single block/fillbiomeChange the biome of an area/gameruleRead or change the game rules of a world/timeSet, speed up or pause the world clock