Minecraft – How to give relative rotation to armor stand

minecraft-commandsminecraft-java-edition

I'm trying to make a armor stand spin around in 1 degree intervals in a Repeat command block on 15w47c. The problem is, '~' doesn't seem to work for relative rotation when using with the Rotation tag in /entitydata.

Here's what I've tried;

/entitydata @e[type=ArmorStand,r=10] {Rotation:[~1f,0f]} 

and

/entitydata @e[type=ArmorStand,r=10] {Pose:{Head:[0f,~1f,0f]}}

Both just move to 1f, instead of increasing every iteration. I just need the head to turn, but the whole armor stand is fine too. Any suggestions?

Best Answer

You cannot use relative values for changing NBTData unfortunately. Only having the head turn would take 360 command blocks, one for each rotation degree.

Having the whole stand turn is easy though, as /tp can change rotation of an entire entity, and accepts relative values. Try something like this on a clock:

/tp @e[type=ArmorStand,r=10] ~ ~ ~ ~1 ~
Related Topic