Commands/clone

From Minecraft Wiki
Jump to: navigation, search
clone
Permission level required

2‌[JE only]
1‌[BE only]

Restrictions

Cheat only‌[BE only]

Clones blocks from one region to another.

Syntax[edit]

  • Java Edition
clone <begin> <end> <destination> [replace|masked] [force|move|normal]
Clones all blocks or only non-air blocks.
clone <begin> <end> <destination> filtered <filter> [force|move|normal]
Clones only blocks with the block id specified by <filter>.
  • 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> <tileData: int>
Clones only blocks with the block id specified by <filter>.

Arguments[edit]

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, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation. In Bedrock Edition, it 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<destination>: block_pos
BE: destination: x y z: CommandPosition

Specifies the lower northwest corner of the destination region.
In Java Edition, it must be a block position composed of <x>, <y> and <z>, each of which must be an integer or tilde and caret notation. In Bedrock Edition, it 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

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

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: Block

Specifies the block id to copy in filtered mode.
In Java Edition, it must be a block argument (accepts block tags). In Bedrock Edition, it must be a block id.

BE: tileData: int: int

Specifies the block data to match when finding blocks to clone. Values that are invalid for the specified block id revert to 0. If -1, all blocks that match tileName: Block are cloned.
Must be a 32-bit integer number. It must be between -1 and 65535 (inclusive).

Result[edit]

CommandTriggerJava EditionBedrock Edition
anythe arguments are not specified correctly Unparseable Failed
one or both specified regions are unloaded or out of the world Failed
the volume of the source region is greater than 32768 (the equivalent of 8 chunk sections)‌ N/A
the volume of the source region is greater than 524288(equivalent to 8 chunks)‌ N/A Failed
/clone ... move ...
/clone ... normal ...
the source and destination region overlap Failed
/clone ... move ...there is no block changed in the target region (after the specified blocks in the source region are replaced with air)
/clone ... force ...
/clone ... normal ...
there is no block changed in the target region
anyOn successClones or moves blocks.

Output[edit]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
On success11the number of blocks changed in the target region.
Bedrock EditionOn fail0N/AN/A
On success1N/AN/A

History[edit]

Dark Oak Sapling JE2 BE2.png
This section of the article is a stub. 
You can help by expanding it.
Java Edition
1.814w03aAdded /clone.
14w10aAdded force option.
14w20aAdded move 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.

See also[edit]

/fill – fill a region with a block.