0

enter image description hereIs there a way to clone with the relative coordinates of a player and the command block? I am trying to make a "one-command-creation" with those two things. I am in 1.12. Like /clone {Relative coords of command block} {Relative coords of player}

  • Arqade usually works better when you can show us something that you've tried so far. At the moment, this is more of a request than a question. – Timmy Jim Jul 16 '17 at 19:39
  • What exactly are you trying to do? Coordinates are no entities or blocks, you can't clone them. – Fabian Röling Jul 16 '17 at 20:53
  • I still don't know what you want to do. Can you give an example? – Fabian Röling Jul 17 '17 at 10:18
  • Ah, ok, you want to clone an area that is relative to one variable location to another variable location. Got it. I'll write an answer… – Fabian Röling Jul 17 '17 at 19:14
  • @Unknown Did you delete your comments? Now people can only see one side of this conversation. Please don't do that. – Fabian Röling Aug 10 '17 at 18:03
0

To clone an area from one variable location to another location, you can first clone it to some coordinates you know, then from there to where you want to have it and then delete the middle copy. So for example to clone a 10x10x10 area with the player Horst as the lowest x, y and z coordinate to another area with the player Herbert as the lowest x, y and z coordinate you can use the following commands: /clone @p[name=Horst] ~ ~ ~ ~9 ~9 ~9 0 245 0 /clone @p[name=Herbert] 0 245 0 9 254 9 ~ ~ ~ /fill 0 245 0 9 254 9 air

Keep in mind that you delete everything in the area from 0 254 0 to 9 254 9, so make sure to choose an area with nothing (important) in it.

0

It sounds to me like you're trying to clone from a location relative to a command block to a location relative to the player. As Fabian says, ~ is for relative coordinates. Specifically, relative coordinates are relative to the executor of the command. When a command block runs a command, the command block is the executor. When you run a command in chat, you are the executor. So both entities and blocks can be the executor. To do anything from a command block relative to the player, you will have to use the command block to make the player the executor, which is done using the /execute command.

The catch here, of course, is that since /clone is a single command, it can only be executed relative to a single executor. So you will either need to first clone from relative to the command block to an intermediary location addressed using absolute coordinates, and then /execute at the player to clone from there to beside them, or execute everything relative to the player in the first place.

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.