Fills all or parts of a region with a specific block.
- Java Edition
fill <from> <to> <block> [destroy|hollow|keep|outline|replace]
- The fill command also has an optional alternate syntax when using the
fill <from> <to> <block> replace [<filter>]
- Bedrock Edition
fill <from: x y z> <to: x y z> <tileName: Block> [tileData: int] [oldBlockHandling: FillMode]
- The fill command also has an optional alternate syntax for
fill <from: x y z> <to: x y z> <tileName: Block> <tileData: int> replace [replaceTileName: Block] [replaceDataValue: int]
from: x y z and
to: x y z )
- Specifies any two opposing corner blocks of the region to be filled (the "fill region"). May use tilde and caret notation to specify distances relative to the command's execution.
- The blocks that make up the corners extend in the positive direction from the coordinates used to identify them. Because of this, the lesser coordinates of each axis are on the region boundary, but the greater coordinates are one block from the boundary, and the block volume of the source region is (xgreater - xlesser + 1) × (ygreater - ylesser + 1) × (zgreater - zlesser + 1). For example,
0 0 0 0 0 0has a 1-block volume, and
0 0 0 1 1 1and
1 1 1 0 0 0both identify the same region with an 8-block volume.
- Specifies the block to fill the region with. Must be a block ID.
tileData: int[Bedrock Edition only]
- Specifies the block data to use for the fill block. Must be an integer between 0 and 65535 (inclusive), but values that are invalid for the specified item id revert to 0. If not specified, defaults to 0.
destroy- Replaces all blocks (including air) in the fill region with the specified block, dropping the existing blocks (including those that are unchanged) and block contents as entities as if they had been mined with an unenchanted diamond shovel or pickaxe. (Blocks that can be mined only with shears, such as vines, do not drop; neither do liquids.)
hollow- Replaces only the blocks on the outer edge of the fill region with the specified block. Inner blocks are changed to air, dropping their contents as entities but not themselves. If the fill region has no inner blocks (because it is smaller than three blocks in at least one dimension), acts like
keep- Replaces only the air blocks in the fill region with the specified block.
outline- Replaces only the blocks on the outer edge of the fill region with the specified block. Inner blocks are not affected. If the fill region has no inner blocks (because it is smaller than three blocks in at least one dimension), acts like
replace- Replaces all blocks (including air) in the fill region with the specified block, without dropping blocks or block contents as entities. Optionally, instead of specifying a data tag for the replacing block, block ID and data values may be specified to limit which blocks are replaced (see replaceTileName and replaceDataValue below)
- If not specified, defaults to
replaceTileName: Block and
- Arguments are valid only for
- Specifies the ID of the blocks in the fill region to be replaced. In Bedrock Edition, if replaceDataValue is not specified, data value is ignored when determining which blocks to replace; if both arguments are not specified, replaces all blocks in the fill region.
Fails if the arguments are not specified correctly, if the fill region is not loaded, if the block volume of the fill region is greater or equal to 32768, if
tileData are invalid for the specified block id, or if no blocks were changed.
On success, changes blocks in the fill region to the specified block.
/fill 52 63 -1516 33 73 -1536 minecraft:gold_block replace minecraft:orange_glazed_terracotta[Java Edition only]
/fill 52 63 -1516 33 73 -1536 gold_block 0 replace orange_glazed_terracotta[Bedrock Edition only]
- Replaces all the orange stained glazed terracotta in the selected area with gold blocks.
/fill ~-3 ~-3 ~-3 ~3 ~-1 ~3 water
- Replaces the blocks in a 7x7x3 cube directly beneath the command execution's location with water.
/fill ~-3 ~ ~-4 ~3 ~4 ~4 minecraft:stone hollow[Java Edition only]
/fill ~-3 ~ ~-4 ~3 ~4 ~4 stone 0 hollow[Bedrock Edition only]
- Creates a house-sized box around the command execution's location, replacing any blocks that would have been inside the box with air.
/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 stone
- Creates a solid cube of stone centered on the command execution's location.
|This section is a stub, meaning that it lacks some important information. You can help by expanding it with further information relating to the topic.|
|1.11||16w32a||Added block state support to |
|Pocket Edition Alpha|
|0.16.0||build 1||Added |