Commands/fill

Fills all or parts of a region with a specific block.

Syntax

 * Java Edition
 * The fill command also has an optional alternate syntax when using the  option:
 * The fill command also has an optional alternate syntax when using the  option:


 * Bedrock Edition
 * The fill command also has an optional alternate syntax for  mode:
 * The fill command also has an optional alternate syntax for  mode:
 * The fill command also has an optional alternate syntax for  mode:

Arguments

 * and
 * and
 * Specifies any two opposing corner blocks of the region to be filled (the "fill region").
 * Block position is the coordinates of the point at the lower northwest corner of a block. 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,  has a 1-block volume, and   and   both identify the same region with an 8-block volume.
 * Block position is the coordinates of the point at the lower northwest corner of a block. 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,  has a 1-block volume, and   and   both identify the same region with an 8-block volume.


 * Specifies the block to fill the region with.


 * Specifies the block data to use for the fill block. Values that are invalid for the specified block id revert to 0. If not specified, defaults to 0.
 * It should be between 0 and 65535 (inclusive).
 * It should be between 0 and 65535 (inclusive).


 * Specifies the block states to use for the block.
 * Specifies the block states to use for the block.


 * - 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.)
 * - 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.
 * - Replaces only the air blocks in the fill region with the specified block.
 * - 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.
 * - 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.
 * If not specified, defaults to.
 * - 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.
 * If not specified, defaults to.


 * Specifies the ID of the blocks in the fill region to be replaced. If not specified, replaces all blocks in the fill region.


 * Specifies the block data to match when finding blocks to clone. Values (bitwise AND 0xFFFF) that are invalid for the specified block id revert to 0. If  or not specified, all blocks that match   are filled.
 * It must be between -2147483648 and 2147483647 (inclusive).
 * It must be between -2147483648 and 2147483647 (inclusive).


 * Specifies the block states to use for the block to be replaced.
 * Specifies the block states to use for the block to be replaced.

Examples

 * Replaces all the orange glazed terracotta in the selected area with gold blocks.
 * Replaces the blocks in a 7x3x7 region directly beneath the command execution's location with water.
 * Creates a house-sized box around the command execution's location, replacing any blocks that would have been inside the box with air.
 * Creates a solid cube of stone centered on the command execution's location.
 * Replaces the specific blocks around the command execution's location with waterlogged prismarine brick stairs facing south.
 * Creates a house-sized box around the command execution's location, replacing any blocks that would have been inside the box with air.
 * Creates a solid cube of stone centered on the command execution's location.
 * Replaces the specific blocks around the command execution's location with waterlogged prismarine brick stairs facing south.
 * Creates a solid cube of stone centered on the command execution's location.
 * Replaces the specific blocks around the command execution's location with waterlogged prismarine brick stairs facing south.
 * Replaces the specific blocks around the command execution's location with waterlogged prismarine brick stairs facing south.
 * Replaces the specific blocks around the command execution's location with waterlogged prismarine brick stairs facing south.

History
Befehl/fill Commandes Comandos/fill コマンド/fill Comandos/fill Команды консоли/fill Команди консолі/fill 命令/fill