4

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?

5

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 ~
  • Can't believe I didn't think of this! Thanks! – Shane Smiskol Nov 26 '15 at 12:56

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.