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>
.
- Clones only blocks with the block id specified by
- Syntax displayed in various ways
Simplified tree: clone <begin> <end> . . .
clone from <sourceDimension> <begin> <end> . . .
... <destination> . . .
... to <targetDimension> <destination> . . .
... [replace|masked] [force|move|normal]
... filtered <filter> [force|move|normal]
Maximised: clone <begin> <end> <destination>
clone from <sourceDimension> <begin> <end> <destination>
clone <begin> <end> <destination> replace [force|move|normal]
clone from <sourceDimension> <begin> <end> <destination> replace [force|move|normal]
clone <begin> <end> <destination> masked [force|move|normal]
clone from <sourceDimension> <begin> <end> <destination> masked [force|move|normal]
clone <begin> <end> <destination> filtered <filter> [force|move|normal]
clone from <sourceDimension> <begin> <end> <destination> filtered <filter> [force|move|normal]
clone <begin> <end> to <targetDimension> <destination>
clone from <sourceDimension> <begin> <end> to <targetDimension> <destination>
clone <begin> <end> to <targetDimension> <destination> replace [force|move|normal]
clone from <sourceDimension> <begin> <end> to <targetDimension> <destination> replace [force|move|normal]
clone <begin> <end> to <targetDimension> <destination> masked [force|move|normal]
clone from <sourceDimension> <begin> <end> to <targetDimension> <destination> masked [force|move|normal]
clone <begin> <end> to <targetDimension> <destination> filtered <filter> [force|move|normal]
clone from <sourceDimension> <begin> <end> to <targetDimension> <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]
- 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>
.
- Clones only blocks with the block id specified by
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, and0 0 0 1 1 1
and1 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[]
Command | Trigger | Java Edition | Bedrock Edition |
---|---|---|---|
any | the 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 |
any | Otherwise | Successful |
Output[]
Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
---|---|---|---|---|---|
any | Java Edition | On fail | 0 | 0 | 0 |
On success | 1 | 1 | the number of blocks that are successfully cloned. | ||
Bedrock Edition | On fail | 0 | N/A | N/A | |
On success | 1 | N/A | N/A |
History[]
This section needs expansion.
You can help by expanding it.
Java Edition | |||||
---|---|---|---|---|---|
1.8 | 14w03a | Added /clone . | |||
14w10a | Added force option. | ||||
14w20a | Added move option. | ||||
1.19.4 | 23w03a | Added 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.0 | build 1 | Added /clone . | |||
Functionality is almost equivalent to Java Edition 1.10 usage, except /clone cannot use forced cloneMode. | |||||
Bedrock Edition | |||||
1.16.210 | beta 1.16.210.53 | Added block state support to /clone . | |||
beta 1.16.210.57 | Cloning a block of the same type is no longer treated as a failed operation. | ||||
1.19.70 | beta 1.19.70.21 | Removed tileData: int argument. |
References[]
See also[]
/fill
– fill a region with a block.