MiniBench

MiniBench / Learn / Commands

Command Bedrock Edition ~3 min read

The /fill command

Fill a whole region with one block — the fastest way to lay floors, walls, and boxes.

What it does

/fill sets every block in the box between two opposite corners to the block you choose. It's the workhorse behind most builds: one line can place thousands of blocks, so floors, walls, platforms, and clearing out space all become a single command.

Syntax

fill <from: x y z> <to: x y z> <block> [replaceMode]
fill <from: x y z> <to: x y z> <block> replace [oldBlock]
from / to
Any two opposite corners of the box. Order does not matter.
block
The block to place, e.g. stone, oak_planks, glass, air.
replaceMode
replace (default) · hollow (shell + air inside) · outline (edges only) · keep (only fill air) · destroy (break old blocks, drop items).
oldBlock
With replace, only swap blocks that match this one.

Examples

fill ~-3 ~ ~-3 ~3 ~ ~3 cobblestone

A 7×7 cobblestone floor centered on your feet.

fill ~-3 ~ ~-3 ~3 ~4 ~3 oak_planks hollow

A hollow oak box — walls, floor, and ceiling, empty inside. Perfect for a quick house shell.

fill 0 64 0 15 64 15 air

Clear a flat 16×16 area at exact coordinates.

fill ~-5 ~ ~-5 ~5 ~ ~5 stone replace grass_block

Turn only the grass in the area into stone, leaving everything else.

See it in action

Before and after running /fill — in MiniBench's 3D preview and in Minecraft.

Command run

fill ~-1 ~ ~8 ~1 ~2 ~10 gold_block
In MiniBench
Writing the /fill command in the MiniBench editor (before)

Before

Writing the /fill command in the MiniBench editor (after)

After

MiniBench 3D preview
A cobblestone base and hollow oak box from /fill in the MiniBench 3D preview
In Minecraft
A gold block cube filled with /fill in Minecraft (before)

Before

A gold block cube filled with /fill in Minecraft (after)

After

Not affiliated with Mojang or Microsoft. Minecraft is a trademark of Mojang Synergies AB.

Tips & techniques

Watch out for

Used in these tutorials

See /fill in action inside a full project walkthrough:

Write it in MiniBench with autocomplete and live validation, then run it in Minecraft.