Split up Motion tag so it lines up with Rotation
Right now, the Motion tag is like so: "[x, y, z] which is not very handy for finding out or easily changing how fast an entity is moving in a certain direction. Also can't you par it with the Rotation tag which is formatted as [pitch, yaw], which is nice for use with relative motion or others (you can set it or check it for something straight in front instead of in a certain x y z direction).
To make it possible to do par them (and so do a lot of new stuff with Rotation and motion like moving entities in the direction someone is looking), there has to be a split between the Direction an entity is looking and the Speed at which the entity is moving in that direction.
This works like so:
1. The Motion tag is removed and a new tag is added (could also be called Motion, or could be called something else like "Trajectory", "MotionAngle" or perhaps "Direction") which uses the exact same format as the Rotation tag (unlike the original Motion tag, this one would be in float values instead of doubles, because it has to be compatible with the Rotation tag. If this is *not* a requirement, doubles would of coarse be preferred, if possible)
2. Another new tag is added that gives the Speed in blocks per tick that the entity is moving in the specified direction. (this would then of coarse be in double values)
3. For the calculation of the Motion of an entity, both new tags could be used to do so. The direction still gives the same function of x, y, z location but just can now be paired with the Rotation of the entity. (and is in degrees instead of coordinates)
I think this would be a fine and not too radical change for use in minigames, command creations or other fun experiments.
It can't hurt to do this as it doesn't take away the functionality that Motion had while adding accessibility and ease for playing with these values in-game! :)
Please sign in to leave a comment.