Minecraft:Commands/clone: Difference between revisions
More actions
Remove broken links to missing pages |
Fix template calls: add MC/ prefix |
||
| Line 68: | Line 68: | ||
== Arguments == | == Arguments == | ||
{{ | {{MC/El|je|short=1}}: {{MC/Argument|sourceDimension|dimension}} | ||
: Specifies the dimension to clone the blocks from. If unspecified, defaults to current execution dimension. | : Specifies the dimension to clone the blocks from. If unspecified, defaults to current execution dimension. | ||
: {{ | : {{MC/Arg desc|je=dimension}} | ||
{{ | {{MC/El|je|short=1}}: {{MC/Argument|begin|block_pos}} and {{MC/Argument|end|block_pos}}<br> | ||
{{ | {{MC/El|be|short=1}}: {{MC/Argument|be=1|begin: x y z|CommandPosition}} and {{MC/Argument|be=1|end: x y z|CommandPosition}} | ||
: Specifies the coordinates of two opposing corner blocks of the source region. | : Specifies the coordinates of two opposing corner blocks of the source region. | ||
: {{ | : {{MC/Arg desc|je=block_pos|be=CommandPosition}} | ||
: 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 (x<sub>greater</sub> - x<sub>lesser</sub> + 1) × (y<sub>greater</sub> - y<sub>lesser</sub> + 1) × (z<sub>greater</sub> - z<sub>lesser</sub> + 1). For example, <code>0 0 0 0 0 0</code> has a 1-block volume, and <code>0 0 0 1 1 1</code> and <code>1 1 1 0 0 0</code> both identify the same region with an 8-block volume. | : 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 (x<sub>greater</sub> - x<sub>lesser</sub> + 1) × (y<sub>greater</sub> - y<sub>lesser</sub> + 1) × (z<sub>greater</sub> - z<sub>lesser</sub> + 1). For example, <code>0 0 0 0 0 0</code> has a 1-block volume, and <code>0 0 0 1 1 1</code> and <code>1 1 1 0 0 0</code> both identify the same region with an 8-block volume. | ||
{{ | {{MC/El|je|short=1}}: {{MC/Argument|targetDimension|dimension}} | ||
: Specifies the dimension to clone the blocks to. If unspecified, defaults to current execution dimension. | : Specifies the dimension to clone the blocks to. If unspecified, defaults to current execution dimension. | ||
: {{ | : {{MC/Arg desc|je=dimension}} | ||
{{ | {{MC/Argument|destination|block_pos|destination: x y z|CommandPosition}} | ||
: Specifies the lower northwest corner of the destination region. | : Specifies the lower northwest corner of the destination region. | ||
: {{ | : {{MC/Arg desc|je=block_pos|be=CommandPosition}} | ||
{{ | {{MC/El|je|short=1}}: {{MC/Code|replace}} and {{MC/Code|masked}}<br> | ||
{{ | {{MC/El|be|short=1}}: {{MC/Argument|be=1|maskMode: MaskMode|enum}} | ||
: Specifies whether to filter the blocks being cloned. Must be one of the following: | : Specifies whether to filter the blocks being cloned. Must be one of the following: | ||
:* <code>replace</code> — Copy all blocks, overwriting ''all'' blocks of the destination region with the blocks from the source region. | :* <code>replace</code> — Copy all blocks, overwriting ''all'' blocks of the destination region with the blocks from the source region. | ||
| Line 93: | Line 93: | ||
: If unspecified, defaults to <code>replace</code>. | : If unspecified, defaults to <code>replace</code>. | ||
{{ | {{MC/El|je|short=1}}:{{MC/Cd|strict}} | ||
: Makes the command place blocks as-is without triggering block updates and shape updates. | : Makes the command place blocks as-is without triggering block updates and shape updates. | ||
{{ | {{MC/El|je|short=1}}: {{code|force{{!}}move{{!}}normal}}<br> | ||
{{ | {{MC/El|be|short=1}}: {{MC/Argument|be=1|cloneMode: CloneMode|enum}} | ||
: Specifies how to treat the source region. Must be one of the following: | : Specifies how to treat the source region. Must be one of the following: | ||
:* <code>force</code> — Force the clone even if the source and destination regions overlap. | :* <code>force</code> — Force the clone even if the source and destination regions overlap. | ||
| Line 104: | Line 104: | ||
: If unspecified, defaults to <code>normal</code>. | : If unspecified, defaults to <code>normal</code>. | ||
{{ | {{MC/Argument|filter|block_predicate|tileName: Block|enum}} | ||
: Specifies the block id to copy in <code>filtered</code> mode. | : Specifies the block id to copy in <code>filtered</code> mode. | ||
: {{ | : {{MC/Arg desc|je=block_predicate|be=Block}} | ||
{{ | {{MC/El|be|short=1}}: {{MC/Argument|be=1|blockStates: block states|BlockStateCommandParam}} | ||
: Specifies the block states to use for the block. | : Specifies the block states to use for the block. | ||
: {{Arg desc|be=BlockStateCommandParam}} | : {{MC/Arg desc|be=BlockStateCommandParam}} | ||
== Result == | == Result == | ||
| Line 131: | Line 131: | ||
== Output == | == Output == | ||
{{Output table}} | {{MC/Output table}} | ||
{{Output table|edition=je|On fail|0|0|0}} | {{MC/Output table|edition=je|On fail|0|0|0}} | ||
{{Output table|On success|1|1|the number of blocks that are successfully cloned.}} | {{MC/Output table|On success|1|1|the number of blocks that are successfully cloned.}} | ||
{{Output table|edition=be|On fail|0}} | {{MC/Output table|edition=be|On fail|0}} | ||
{{Output table|On success|1}} | {{MC/Output table|On success|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
== History == | == History == | ||
{{Expand section}} | {{MC/Expand section}} | ||
=== ''Java Edition'' === | === ''Java Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.8|dev=14w03a|Added {{ | |{{HistoryLine||1.8|dev=14w03a|Added {{MC/Cmd|clone|link=none}}.}} | ||
|{{HistoryLine|||dev=14w10a|Added {{ | |{{HistoryLine|||dev=14w10a|Added {{MC/Cd|force}} option.}} | ||
|{{HistoryLine|||dev=14w20a|Added {{ | |{{HistoryLine|||dev=14w20a|Added {{MC/Cd|move}} option.}} | ||
|{{HistoryLine||1.13|dev=17w45a| | |{{HistoryLine||1.13|dev=17w45a| | ||
The syntax of /clone has been changed.| | The syntax of /clone has been changed.| | ||
{{cmd|clone <begin> <end> <destination> filtered [force{{!}}move{{!}}normal] [<block>] [<data>]|link=none}} becomes {{cmd|clone <begin> <end> <destination> filtered [<block>] [force{{!}}move{{!}}normal].|link=none}}| | {{cmd|clone <begin> <end> <destination> filtered [force{{!}}move{{!}}normal] [<block>] [<data>]|link=none}} becomes {{cmd|clone <begin> <end> <destination> filtered [<block>] [force{{!}}move{{!}}normal].|link=none}}| | ||
{{cmd|clone <begin> <end> <destination> [replace{{!}}masked] [force{{!}}move{{!}}normal] [<block>] [<data>]|link=none}} becomes {{cmd|clone <begin> <end> <destination> [replace{{!}}masked] [force{{!}}move{{!}}normal].|link=none}}}} | {{cmd|clone <begin> <end> <destination> [replace{{!}}masked] [force{{!}}move{{!}}normal] [<block>] [<data>]|link=none}} becomes {{cmd|clone <begin> <end> <destination> [replace{{!}}masked] [force{{!}}move{{!}}normal].|link=none}}}} | ||
|{{HistoryLine||1.19.4|dev=23w03a|Added {{ | |{{HistoryLine||1.19.4|dev=23w03a|Added {{MC/Cd|dimension}} argument. | ||
|Now the limit volume of the clone region is controlled by <code>commandModificationBlockLimit</code> gamerule, instead of a hardcoded value 32768.}} | |Now the limit volume of the clone region is controlled by <code>commandModificationBlockLimit</code> gamerule, instead of a hardcoded value 32768.}} | ||
|{{HistoryLine||1.21.5|dev=25w02a|Accepts a new option: <code>strict</code>.|New syntax for commands to use the new strict option.}} | |{{MC/HistoryLine||1.21.5|dev=25w02a|Accepts a new option: <code>strict</code>.|New syntax for commands to use the new strict option.}} | ||
}} | }} | ||
=== ''Bedrock Edition'' === | === ''Bedrock Edition'' === | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|pocket alpha}} | |{{MC/HistoryLine|pocket alpha}} | ||
|{{HistoryLine||v0.16.0|dev=build 1|Added {{ | |{{HistoryLine||v0.16.0|dev=build 1|Added {{MC/Cmd|clone|link=none}}.|Functionality is almost equivalent to Java Edition 1.10 usage, except {{MC/Cmd|clone|link=none}} cannot use {{MC/Cd|forced}} cloneMode.}} | ||
|{{HistoryLine|bedrock}} | |{{MC/HistoryLine|bedrock}} | ||
|{{HistoryLine||1.16.210|dev=beta 1.16.210.53|Added block state support to {{ | |{{HistoryLine||1.16.210|dev=beta 1.16.210.53|Added block state support to {{MC/Cmd|clone|link=none}}.}} | ||
|{{HistoryLine|||dev=beta 1.16.210.57|Cloning a block of the same type is no longer treated as a failed operation.}} | |{{MC/HistoryLine|||dev=beta 1.16.210.57|Cloning a block of the same type is no longer treated as a failed operation.}} | ||
|{{HistoryLine||1.18.0|dev=?|The limit volume of {{ | |{{HistoryLine||1.18.0|dev=?|The limit volume of {{MC/Cmd|clone|link=none}} is 655360 now, instead of 524288.}} | ||
|{{HistoryLine||1.19.70|dev=Preview 1.19.70.21|Removed <code>tileData: int</code> argument.}} | |{{MC/HistoryLine||1.19.70|dev=Preview 1.19.70.21|Removed <code>tileData: int</code> argument.}} | ||
|{{HistoryLine||1.21.0|dev=Preview 1.21.0.20|Containers being cloned over no longer keep their container screens open.}} | |{{MC/HistoryLine||1.21.0|dev=Preview 1.21.0.20|Containers being cloned over no longer keep their container screens open.}} | ||
}} | }} | ||
| Line 172: | Line 172: | ||
== See also == | == See also == | ||
: {{ | : {{MC/Cmd|fill}} – fill a region with a block. | ||
== External links == | == External links == | ||
| Line 179: | Line 179: | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/clone | de:Befehl/clone | ||
Latest revision as of 20:08, 9 April 2026
Clones Minecraft: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-Minecraft:air blocks.
... [strict] 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> . . .... [strict] [replace|masked] [force|move|normal]... [strict] 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
- REDIRECT Template:Edition
Template:Rcat: <sourceDimension>: dimension
- Specifies the dimension to clone the blocks from. If unspecified, defaults to current execution dimension.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|dimension}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- REDIRECT Template:Edition
Template:Rcat: <begin>: block_pos and <end>: block_pos
- REDIRECT Template:Edition
Template:Rcat: begin: x y z: CommandPosition and end: x y z: CommandPosition
- Specifies the coordinates of two opposing corner blocks of the source region.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|block_pos}}{{#vardefine:be-arg|block_pos}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- 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 0has a 1-block volume, and0 0 0 1 1 1and1 1 1 0 0 0both identify the same region with an 8-block volume.
- REDIRECT Template:Edition
Template:Rcat: <targetDimension>: dimension
- Specifies the dimension to clone the blocks to. If unspecified, defaults to current execution dimension.
- {{#vardefine:onlyje|}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|dimension}}{{#vardefine:be-arg|}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Template:El: <destination>: block_pos
Template:El: destination: x y z: CommandPosition
- Specifies the lower northwest corner of the destination region.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|block_pos}}{{#vardefine:be-arg|block_pos}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- REDIRECT Template:Edition
Template:Rcat: replace and masked
- REDIRECT Template:Edition
Template:Rcat: 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.
- REDIRECT Template:Edition
- REDIRECT Template:Code
- Makes the command place blocks as-is without triggering block updates and shape updates.
- REDIRECT Template:Edition
- REDIRECT Template:Edition
Template:Rcat: 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.
Template:El: <filter>: block_predicate
Template:El: tileName: Block: enum
- Specifies the block id to copy in
filteredmode. - {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe| Template:IN,}}{{#vardefine:je-arg|block_predicate}}{{#vardefine:be-arg|block_be}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
- REDIRECT Template:Edition
Template:Rcat: blockStates: block states: BlockStateCommandParam
- Specifies the block states to use for the block.
- {{#vardefine:onlyje|Template:IN,}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|blockstatecommandparam}}Template:Error{{#vardefine:onlyje|}}{{#vardefine:onlybe|}}{{#vardefine:je-arg|}}{{#vardefine:be-arg|}}
Result
Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table
Output
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|the number of blocks that are successfully cloned.}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|0}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|be}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|1}}{{#vardefine:output2-{{#var:output-table-lines}}|N/A}}{{#vardefine:output3-{{#var:output-table-lines}}|N/A}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
History
Template:Message boxTemplate:Article other
Java Edition
Bedrock Edition
References
<references/>
See also
- REDIRECT Template:Command
Template:Redr – fill a region with a block.
External links
de:Befehl/clone es:Comandos/clone ja:コマンド/clone ko:명령어/clone pt:Comandos/clone ru:Команды консоли/clone uk:Команди консолі/clone zh:命令/clone