Minecraft Blogs / Tutorial

A horrible way using Minecraft commands: /clone

  • 7,457 views, 10 today
  • 4
  • 1
flashteens's Avatar flashteens
Level 64 : High Grandmaster Technomancer
242

Introduction

Adventure map makers (such as myself) often need fast building so as to reduce much time doing some repeated work. Using commands can be super fast, as it is possible for you to build a super large building within a few minutes, as you might need several hours to do the same thing without commands. However, commands are dangerous, for the reason that IT CAN'T BE UNDONE!

In my opinion, among all commands available in Minecraft 1.11.2, /clone is one of the most dangerous command I've ever used, though I still often need such a command for my builds. In this tutorial, I'll talk about how terrible such a command is, and also how to prevent such a scenario from happening.


Let's briefly introduce the /clone command.

A bit technical stuff. But, you may also watch this tutorial video and then skip this section. There are actually tons of tutorials on the Web, and of course so is in Minecraft Wiki.

/clone commands copy a specified area into somewhere else. The simplest syntax for such a command looks like:
/clone <x1> <y1> <z1> <x2> <y2> <z2> <targetX> <targetY> <targetZ>

The command selects the range of blocks between (x1, y1, z1) and (x2, y2, z2), and then copies them to the target area. The target point (targetX, targetY, targetZ) is the westmost, bottom, and northmost corner of the target area (i.e. where the X, Y, and Z corrdinates have the minimum values).

Besides, all these arguments can be relative coordinates using the tilde notation, for example, writing ~1 for one of arguments <x1>, <x2>, or <targetX> specifies "one block eastward" from the current location. (More details are available in Minecraft Wiki.)



How to make the /clone command horrible...

One way for fast building is to put some commands such as /fill or /clone into command blocks, and then have it "Always Active" so that you won't have to trigger them with redstone signals. However, when you use the /clone command in such a command block, it can make a serious disaster when the command block is within the specified range (x1, y1, z1) - (x2, y2, z2).

Here's a simple example for you to see how terrible it would be. Just follow all the steps below and a disaster will then happen!
  1. You had better create a new world instead of opening your existing maps, as you won't wish to destroy any buildings you have created before. (When creating the world, make sure that the option "Allow Cheats" should be on to enable commands.)
  2. Enter the new world and type the command: /give @p command_block to get a command block.
  3. Place on the command block anywhere, right-click on the command block, and then type the command: /clone ~ ~ ~ ~ ~ ~ ~1 ~ ~ (DO NOT PRESS ENTER NOW!)
  4. Click on the "Need Redstone" option, and then the button text should become "Always Active". By doing so, the command will be immediately triggered without any other redstone contraptions.
  5. Finally, click on the "Done" button (or press Enter), and... YOU'VE JUST MADE A DISASTER that is UNSTOPPABLE!


How could the disaster happen?

There should be at least the following five conditions in the /clone command to cause such a disaster:
  1. The /clone command is written in a command block.
  2. The command block is Impulse or Repeated. (i.e. not Chain)
  3. The command block is Always Active (i.e. no redstone needed).
  4. The command block copies an area that contains the command block itself.
  5. Relative coordinate (tilde notation) is used in the /clone command.
Let's see the command given in the example again:
/clone ~ ~ ~ ~ ~ ~ ~1 ~ ~

Actually, all what the command do is copy the command block itself to one block eastward. However, a magic then takes place.

Since the newly copied command block is also "Always Active", the command will then run over again, but relative to the new command block instead. If relative coordinate is specified, the 3rd command block is then immediately created by its previous command block, and so are the 4th, 5th, ... In fact, it is nearly impossible to stop the command from keep running one after another. So, you have to be really careful when using the /clone command.


How can I prevent such a nightmare from happening?

If you're still pretty worried about that, here are some alternative tips for you:
  1. Always back up your world before any modifications that requires the /clone command.
  2. If you need to use a same /clone command for dozens of times (for example, building a very long tunnel or bridge), it is strongly suggested NOT to put this command in a command block. Put the /clone command in your chat box instead.
  3. For those who still need to put such a command into an "Always Active" command block (which can be even much faster than chat box commands), please check the first 6 arguments carefully: <x1>, <y1>, <z1>, <x2>, <y2>, and <z2>, and better test out the command in another new world to avoid any damages to your other existing buildings.


That's all for the tutorial. For any suggestions, feel free to comment below. Also, don't forget to give me diamonds, favorite, and subscribe me! :)
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome