#Is there a way to get player direction as data so that I can use it in a macro, or...
1 messages · Page 1 of 1 (latest)
yeah, the player has a rotation array called Rotation
and you can grab Rotation[0] (yaw) and Rotation[1] (pitch)
what exactly is your end goal? sounds very xy problem. you can rotate an entity to the same rotation as another with something like execute rotated as [player] run rotate [armor stand] ~ ~
will make the armor stand go about 10 blocks in front of me slowly, and it'll damage everything in its way.
...im making a wand lmao.
armor stands are suboptimal for that
so yeah no need for macros or looking at data, just rotate the entity (and you should probably be using a marker rather than an armor stand)
I don't know what a marker is... I probably should change my role to beginner. I'm noticing that I know a LOT less than I thought I did.
a marker is a technical entity that replaces many old technical use cases for armor stands. it stores almost no data other than it's position and any arbitrary data applied to it, so it's much more optimized for things like this
Oh wait fr? Yikes I gotta change a lot of code-- Oh, wait, what is actully the benefit of using these? Just optimization right? I'll use them anyway, because this pack will have a LOT of armor stands otherwise. Just wanna know if there's anything else about them.
mostly just optimization yes. originally they also had the unique benefit of being able to store any arbitrary data in their nbt, but that field now exists on all entities
just to get an idea of the impprovement. I could have ~500 armor strands near me before it became unplayable. Markers don't tick and have no model so you can have 500000+ without seeing any meaningful difference in performance.
oh hell yeah, that's really good