Minecraft Wiki
Advertisement

Clones blocks from one region to another.

Syntax[]

  • Java Edition
clone . . .
clone from <sourceDimension> . . .
  • ... <begin> <end> . . .
    • ... <destination> . . .
    • ... to <targetDimension> <destination> . . .
      • ... [replace|masked] [force|move|normal]
        Clones all blocks or only non-air blocks.
      • ... filtered <filter> [force|move|normal]
        Clones only blocks with the block id specified by <filter>.
Syntax displayed in various ways
  • Bedrock Edition
clone <begin: x y z> <end: x y z> <destination: x y z> [maskMode: MaskMode] [cloneMode: CloneMode]
Clones all blocks or only non-air blocks.
clone <begin: x y z> <end: x y z> <destination: x y z> filtered <cloneMode: CloneMode> <tileName: Block> [blockStates: block states]
Clones only blocks with the block id specified by <tileName: Block>.

Arguments[]

JE: <sourceDimension>: dimension

Specifies the dimension to clone the blocks from. If unspecified, defaults to current execution dimension.
It must be the resource location, which will be resolved during command execution into a dimension.

JE: <begin>: block_pos and <end>: block_pos
BE: begin: x y z: CommandPosition and end: x y z: CommandPosition

Specifies the coordinates of two opposing corner blocks of the source region.
In Java Edition, must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.
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 falls right 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 0 has a 1-block volume, and 0 0 0 1 1 1 and 1 1 1 0 0 0 both identify the same region with an 8-block volume.

JE: <targetDimension>: dimension

Specifies the dimension to clone the blocks to. If unspecified, defaults to current execution dimension.
It must be the resource location, which will be resolved during command execution into a dimension.

JE<destination>: block_pos
BE: destination: x y z: CommandPosition

Specifies the lower northwest corner of the destination region.
In Java Edition, must be a block position composed of <x>, <y> and <z>, each of which must be an integer or a tilde and caret notation. In Bedrock Edition, must be a three-dimensional coordinates composed of <x>, <y> and <z>, each of which must be a floating-point number or tilde and caret notation.

JE: replace|masked
BE: maskMode: MaskMode: enum

Specifies whether to filter the blocks being cloned. Must be one of the following:
  • replace — Copy all blocks, overwriting all blocks of the destination region with the blocks from the source region.
  • masked — Copy only non-air blocks. Blocks in the destination region that would otherwise be overwritten by air are left unmodified.
If unspecified, defaults to replace.

JE: force|move|normal
BE: cloneMode: CloneMode: enum

Specifies how to treat the source region. Must be one of the following:
  • force — Force the clone even if the source and destination regions overlap.
  • move — Clone the source region to the destination region, then replace the source region with air. When used in filtered mask mode, only the cloned blocks are replaced with air.
  • normal — Don't move or force.
If unspecified, defaults to normal.

JE<filter>: block_predicate
BE: tileName: Block: enum

Specifies the block id to copy in filtered mode.
In Java Edition, must be in the format of block_id[block_states]{data_tags}(accepts block tags), in which block states and data tags can be omitted when they are not needed. In Bedrock Edition, must be a block id.

BE: blockStates: block states: BlockStateCommandParam

Specifies the block states to use for the block.
Must be a blockstate argument as ["<state1>":<value1>,"<state2>":<value2>,...]. For example: ["old_leaf_type":"birch","persistent_bit":true].

Result[]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Unparseable
one or both specified regions are unloaded or out of the world Failed Failed
the volume of the source region is greater than commandModificationBlockLimit gamerule value N/A
the volume of the source region is greater than 524288(equivalent to 8 chunks)‌ N/A Failed
/clone ... normal ...the source and destination region overlap Failed
/clone ... move ...the source and destination region overlap Successful Successful
/clone ... filtered ...there is no specified block in the source region Failed Failed
/clone ... filtered ...tileData: int is lower than -1 or higher than 6553 N/A
/clone ... replace ...all the blocks in the source region are barriers[1] Failed N/A
/clone ... masked ...there is no non-air and non-barrier block[1] in the source region
/clone ... filtered ...the specified block is barrier[1]
/clone ... masked ...there is no non-air block in the source region N/A Failed
anyOtherwiseSuccessful

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
On success11the number of blocks that are successfully cloned.
Bedrock EditionOn fail0N/AN/A
On success1N/AN/A

History[]

Jigsaw Block (top texture) JE2 BE2
This section needs expansion. 
You can help by expanding it.
Java Edition
1.814w03aAdded /clone.
14w10aAdded force option.
14w20aAdded move option.
1.19.423w03aAdded dimension argument.
Now the limit volume of the clone region is controlled by commandModificationBlockLimit gamerule, instead of a hardcoded value 32768.
Pocket Edition Alpha
v0.16.0build 1Added /clone.
Functionality is almost equivalent to Java Edition 1.10 usage, except /clone cannot use forced cloneMode.
Bedrock Edition
1.16.210beta 1.16.210.53Added block state support to /clone.
beta 1.16.210.57Cloning a block of the same type is no longer treated as a failed operation.
1.19.70beta 1.19.70.21Removed tileData: int argument.

References[]

  1. a b c MC-231566

See also[]

/fill – fill a region with a block.
Advertisement