What I wanted to do was a system that would permit you to save your build in an area, in sort of a nothing is changeable, not even the items in a chest.
In fact, how it works is simple: the construction would be cloned into a safe area when the system is in "save mode".

I just want to add a last thing: with the /testforblocks (with an s) command, the system will detect if something was changed during the "save mode" and then change it back to what it was.

How can we change the comparing area of the /testforblocks command?

  • What do you mean by "saving area"? Could you clarify that please?
    – APCoding
    Apr 18 '16 at 0:58
  • Do you mean, "how do I change the areas where /testforblocks compares?"
    – APCoding
    Apr 18 '16 at 1:20
  • Yes; sometimes I really can't find how to clarify things. Thank you, I will edit my question (and add a bounty maybe) :D
    – Kimatuy
    Apr 19 '16 at 11:33
  • If I understand your question correctly, you want to change what areas the command tests for. Can't you just change the command? :P
    – APCoding
    Apr 20 '16 at 0:00
  • Nonono, it's still the same area I want it to check but not the same construction I want it to compare.
    – Kimatuy
    Apr 21 '16 at 13:33

You can find out how the /testforblocks command works here. The syntax is exactly the same as the /clone command. Basically, the first two sets of coordinates specify the two corners of the first cuboid region you want to test, and the third set of coordinates specifies the lower northwestern corner of the cuboid region you want to test your first region to. Both regions will be the same size. In more recent versions of Java Edition Minecraft you can tell which corner of your structure is the lower northwestern corner by hitting F3 and looking at the axes in the center of your screen; whichever corner or your region fits into those axes is the lower northwestern corner of that region. This same trick applies to the /clone command.

In 1.13+, the /testforblocks command was moved into the /execute command to make it easier to compare regions and due something accordingly in the same command. Instead of using the command

/testforblocks 0 0 0 5 10 5 20 10 20

you can use

/execute if blocks 0 0 0 5 10 5 20 10 20

and modify the command to fit what you want. You can read more about the /execute command here.

I'm aware that this post is 3 years old, but this seems like an important question to answer as the syntax of the /clone and /testforblocks commands are very confusing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.