Commands/clone

From Minecraft Wiki
Jump to: navigation, search
clone
Restrictions

Operator

First introduced

Java Edition 1.8 (14w03a)
PE Alpha 0.16.0 (PE Alpha 0.16.0 build 1)

Clones blocks from one region to another.

Syntax[edit]

  • Java Edition
clone <begin> <end> <destination> [replace|masked] [force|move|normal]
clone <begin> <end> <destination> filtered <filter> [force|move|normal]
  • Bedrock Edition
clone <begin: x y z> <end: x y z> <destination: x y z> [maskMode: MaskMode] [cloneMode: CloneMode]
clone <begin: x y z> <end: x y z> <destination: x y z> filtered <cloneMode: CloneMode> <tileName: Block> <tileData: int>

Arguments[edit]

<begin> and <end> (BE: begin: x y z and end: x y z)

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, 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.

<destination> (BE: destination: x y z)

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:
  • 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 left unspecified, defaults to replace.

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 left unspecified, defaults to normal.

<filter> (BE: tileName: Block)

Specifies the block id to copy in filtered mode, in which the command clones only blocks with the block id specified by this argument.

tileData: int[Bedrock Edition only]

Specifies the block data to match when finding blocks to clone. Must be between 0 and 65535 (inclusive), but values that are invalid for the specified block id revert to 0.

Result[edit]

Fails if the block volume of the source region is greater than 32768 (the equivalent of 8 chunk sections)‌[Java Edition only] or 524288(equivalent to 8 chunks)‌[Bedrock Edition only], 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).

History[edit]

This section is a stub, meaning that it lacks some important information. You can help by expanding it with further information relating to the topic.
Java Edition
1.814w03aAdded /clone.
14w10aAdded force option.
14w20aAdded move option.
Pocket Edition Alpha
0.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.