mojira.dev
MC-45156

/clone isn't working properly with relative coordinates

I have used this command:
/clone ~ ~ ~ ~17 ~9 ~-17 ~-50 ~ ~
to clone a 17x9x17 box, but instead of just copying it 50 blocks in the x-direction it moved in the z-direction as well.

as the first set of coordinates (the first corner of the box I'm selecting) are the same coordinates as the command block itself (~ ~ ~), it should (according to me) just move it 50 blocks in the x-direction. What it seems to do is take the second set of commands (second corner of the box) and move those 50 blocks in the x-direction from the commandblock (so the first corner).
So it moves it a bit (17 blocks to be exact, the length of the box) in the z-direction as well, which is just so annoying.
It would be way easier (and way less head calculating) to just take the first set of coordinates and move those 50 blocks from the command block/player, it would make more sense too.

Attachments

Comments 6

Eh, the 3rd coords are relative to THE COMMAND BLOCK/PLAYER, not to the structure that you selected!

RuRo is correct, location is based upon what issues the command. If a command-block then relative to the command block, if a player issues the command then relative to the player.

I know, but as the first set of coordinates (the first corner of the box I'm selecting) are the same coordinates as the command block itself (~ ~ ~), it should (according to me) just move it 50 blocks in the x-direction. What it seems to do is take the second set of commands (second corner of the box) and move those 50 blocks in the x-direction from the commandblock (so the first corner).
So it moves it a bit (17 blocks to be exact, the length of the box) in the z-direction as well, which is just so annoying.

It would be way easier (and way less head calculating) to just take the first set of coordinates and move those 50 blocks from the command block/player, it would make more sense too.

I could of course just make the second set of coordinates the coordinates of the command block, so it's not that big of a deal, but it's just so unlogical.

Agree with Pepijn, the object should take the first corner of the box that is selected and move that corner 50 blocks relative to the command block.

The third set of coordinates that you clone to will be the position of the northwest corner of the selection, not the center. This is why it moves in the z direction.

Pepijn96

(Unassigned)

Unconfirmed

/clone

Minecraft 14w03b

Retrieved