/clone

/clone
Permission level
required
  • 2 ‌
  • 1 ‌
Restrictions

Cheat only‌

Clones blocks from one region to another.

Syntax

  • Java Edition
clone . . .
clone from <sourceDimension> . . .
  • ... <begin> <end> . . .
    • ... <destination> . . .
    • ... to <targetDimension> <destination> . . .
      • ... [strict] [replace] [force|move|normal]
        Clones all blocks.
      • ... [strict] masked [force|move|normal]
        Clones non-air blocks.
      • ... [strict] 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 a resource location, which resolves into a dimension during command execution.

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 single-precision 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 a resource location, which resolves into a dimension during command execution.

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 single-precision floating-point number or tilde and caret notation.

JE: replace and 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.

JEstrict

Makes the command place blocks as-is without triggering block updates and shape updates.

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 command is incomplete, or any argument is 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 655360. N/A Failed
/clone ... normal ...The source and destination region overlap. Failed
/clone ... replace move ...The source region and destination region overlap. Successful
/clone ... filtered ...There is no specified block in the source region. Failed
/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

This section needs expansion.
 
You can help by expanding it.
Java Edition
1.814w03aAdded /clone.
14w10aAdded force option.
14w20aAdded move option.
1.1317w45a The syntax of /clone has been changed.
/clone <begin> <end> <destination> filtered [force|move|normal] [<block>] [<data>] becomes /clone <begin> <end> <destination> filtered [<block>] [force|move|normal].
/clone <begin> <end> <destination> [replace|masked] [force|move|normal] [<block>] [<data>] becomes /clone <begin> <end> <destination> [replace|masked] [force|move|normal].
1.19.423w03aAdded dimension argument.
Now the limit volume of the clone region is controlled by commandModificationBlockLimit gamerule, instead of a hardcoded value 32768.
1.21.525w02aAccepts a new option: strict.
New syntax for commands to use the new strict option.
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.18.0?The limit volume of /clone is 655360 now, instead of 524288.
1.19.70Preview 1.19.70.21Removed tileData: int argument.

References

  1. a b c MC-231566

See also

/fill – fill a region with a block.

Navigation