Fill a Region with Specific Blocks
The /fill command in Minecraft Bedrock Edition lets you fill all or parts of a selected region with a specific block. You define the area using two sets of coordinates that act as opposite corners of a 3D box.
Players use this command to speed up building projects, clear out large areas of land, or swap out one type of block for another using replacement filters and block states.
/fill <from: x y z> <to: x y z> <tileName: Block> <blockStates: block properties> [oldBlockHandling: FillMode]Fill with block state, optional fill mode
/fill <from: x y z> <to: x y z> <tileName: Block> [oldBlockHandling: FillMode]Fill, filter on block states, optional replace with tile name or block state
/fill <from: x y z> <to: x y z> <tileName: Block> <blockStates: block properties> replace [replaceTileName: Block] [replaceBlockStates: block properties]Fill, filtering on block states, with replacement blocks and states
| Argument | Type | What it means |
|---|---|---|
blockStates | block properties | An array of block properties that defines the exact state or variant of the new block. |
from: x y z | position | A vector of float coordinates (x, y, and z) that sets the starting corner of the fill region. |
oldBlockHandling | FillMode | The fill mode that determines how the game handles blocks already inside the target region. |
replaceBlockStates | block properties | An array of block properties that filters which specific states of the existing block get replaced. |
replaceTileName | Block | The block ID of the existing block you want to target and replace inside the fill region. |
tileName | Block | The block ID of the new block you want to fill the region with. |
to: x y z | position | A vector of float coordinates (x, y, and z) that sets the opposite ending corner of the fill region. |
/fill 10 64 10 20 70 20 stoneFills the region between coordinates (10, 64, 10) and (20, 70, 20) with solid stone.
/fill ~-5 ~ ~-5 ~5 ~4 ~5 glass hollowCreates a hollow glass box around your current position with an empty interior.
/fill 100 60 100 115 65 115 air destroyClears the area by filling it with air and breaks all existing blocks as if they were mined.
/fill ~1 ~ ~1 ~8 ~2 ~8 water keepFills the nearby space with water while keeping any existing non-air blocks untouched.
/fill -50 70 -50 -40 70 -40 wool ["color"="red"]Creates a flat floor of red wool using block states to specify the color.
/fill 0 80 0 12 90 12 oak_log ["pillar_axis"="x"] hollowBuilds a hollow structure out of oak logs that are oriented sideways along the X axis.
/fill -30 63 -30 -15 68 -15 cobblestone replace dirtReplaces only the dirt blocks in the selected region with cobblestone, leaving all other blocks alone.
/fill 200 50 200 225 55 225 gold_block [] replace planks ["wood_type"="spruce"]Replaces only spruce planks in the region with gold blocks by using empty block states for the new block and filtering the target block states.
In Minecraft Java Edition, the /fill command does not use a separate bracketed argument for block states; instead, you write the block and its states together before adding modes like /fill <from> <to> <block> destroy, hollow, or keep.
You need the Game Directors permission level and cheats must be enabled in the world.
Use the replace argument followed by the replaceTileName of the block you want to swap out, and optionally add replaceBlockStates to filter by specific block properties.
The blockStates argument is an array of block properties written in square brackets that lets you set specific variants or orientations for the blocks you are placing or replacing.
/clone/daylock/difficulty/fog/gamerule/locate/mobevent/place/setblock/setworldspawn/structure/tickingarea/time/weather