Commands/clone

Clones blocks from one region to another.

Syntax

 * Java Edition


 * Bedrock Edition

Arguments
and (BE:  and )
 * Specifies the coordinates of two opposing corner blocks of the source 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 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,  has a 1-block volume, and   and   both identify the same region with an 8-block volume.

(BE: )
 * Specifies the lower northwest corner (i.e., the smallest coordinates of each axis) of the destination region. May use tilde and caret notation to specify a distance relative to the command's execution.

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

[force|move|normal] (BE: [cloneMode: CloneMode] and )
 * Specifies how to treat the source region. Must be one of the following:
 * — Force the clone even if the source and destination regions overlap.
 * — 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.
 * — Don't move or force.
 * If left unspecified, defaults to.

(BE: )
 * Specifies the block id to copy in  mode, in which the command clones only blocks with the block id specified by this argument.


 * Specifies the block data to match when finding blocks to clone. Must be between 0 and 15 (inclusive).

Result
Fails if the block volume of the source region is greater than 32768 (the equivalent of eight chunk sections) or 524288, if the source and destination region overlap (unless using force clone mode), or if one or both regions isn't currently loaded.

On success, overwrites blocks in the destination region with blocks from the source region, leaving the source region unmodified (unless using move clone mode).