
Command
/fill
Fills a box-shaped area between two corners with one block.
| /fill <from> <to> <block> |
| /fill <from> <to> <block> (destroy|hollow|keep|outline|strict) |
| /fill <from> <to> <block> replace [<filter> [(destroy|hollow|outline|strict)]] |
| Argument | Kind of value | What to type |
|---|---|---|
| <from> | Block position | One corner of the area, as block coordinates X Y Z. |
| <to> | Block position | The opposite corner of the area. |
| <block> | Block | The block to place, optionally with block states in square brackets and data in curly brackets. |
| <filter> | Block test | For replace: which existing blocks are replaced. A block id or a block tag starting with #, optionally with block states and data. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Operators on multiplayer servers, singleplayer worlds with cheats enabled, and command blocks and functions. |
| Result | Reports "Successfully filled" with the number of blocks. The number /execute store saves is the number of blocks changed. |
| Size limit | The area may contain at most as many blocks as the game rule max_block_modifications allows (default 32768). A larger area fails with "Too many blocks in the specified area". |
| No mode | Without a mode, every block in the area is replaced. |
| replace | Replaces every block, or with a filter only the blocks that match the filter. After a filter one more mode can follow: outline, hollow, destroy or strict. |
| keep | Fills only the positions that are empty (Air) and leaves all other blocks as they are. |
| outline | Places the block only on the outer faces of the area and leaves the inside untouched. |
| hollow | Places the block on the outer faces of the area and fills the inside with Air. |
| destroy | Breaks the existing blocks first so that they drop as items, then places the new block. |
| strict | Places the blocks exactly as written and skips the side effects of placing them, such as updates to neighboring blocks. |
| Loaded area | Both corners must be in loaded chunks and inside the world. |
| Nothing changed | The command fails with "No blocks were filled" if no block was changed, for example when the area already consists of that block. |
/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:stoneMakes an 11 by 11 floor of Stone under you.
/fill ~-3 ~ ~-3 ~3 ~4 ~3 minecraft:glass hollowBuilds a Glass box around you and clears its inside.
/fill ~-3 ~ ~-3 ~3 ~4 ~3 minecraft:oak_planks outlineBuilds the outer shell of a box from Oak Planks and keeps whatever is inside.
/fill ~-10 ~-5 ~-10 ~10 ~5 ~10 minecraft:air replace minecraft:waterRemoves all Water in the area around you.
/fill ~-5 ~ ~-5 ~5 ~3 ~5 minecraft:air destroyBreaks every block in the area so that the blocks drop as items.
/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 minecraft:smooth_stone keepFills only the gaps in the floor under you with Smooth Stone.
/fill 0 64 0 10 64 10 minecraft:redstone_block strictPlaces Blocks of Redstone without updating the blocks next to them.



