Minecraft – Need 2 Positions to Clone With /execute

minecraft-commandsminecraft-java-edition

I'm making a randomizer that randomly clones 1 of the 9 units to all armorstands called "chunk". Inside every unit is an armor_stand called "Unit" and this is the command I used:

execute @e[type=armor_stand,name=chunk] ~ ~ ~ execute @r[type=armor_stand,name=Unit] ~ ~ ~ clone ~-3 ~-1 ~-3 ~3 ~5 ~3 ~ ~15 ~

What this does is, it clones a unit 15 blocks above itself but I want it to clone ~-3 ~15 ~-3 above every armor_stand called "chunk"enter image description here

You can see a random unit is clone ~ ~15 ~ above the armor_stand calling unit.
The armor_stand you can see is called "chunk".

Best Answer

/clone can't take relative coordinates of two entities. You'll have to clone it first to a fixed location (maybe 0 0 0, just make sure it's definitely loaded) and then to the target location. Then you can delete it at 0 0 0 or just leave it there if that doesn't interfere with anything.

Related Topic