Press A to add a Point. Move the green dot to specify the location. Press W to wipe path data. Press Space to redraw the spline.
This thing might be used for a train datapack in minecraft. You can see some of the potential code in my comments.