This mod is a fork of View Lock by FamroFexl that is updated to 1.21.10. If the original project is updated, this will no longer be maintained.
This mod locks your view to a specific direction and can be adjusted to only lock up and down or left and right. The view can also be locked to the closest x and y axes using a key. This is a fork of the original mod intended to maintain support of the latest release of Minecraft Java Edition.
See https://modrinth.com/mod/view-lock for original description of Mod. Here's their buymeacoffee link: https://buymeacoffee.com/famrofexl.
Requrements:
Align your view to whichever x and y axis you would like and press Y. This will lock your view to those axes. To unlock/lock your up and down movement, press U. To unlock/lock your left and right movement, press I. Alternatively, just press U or I to unlock/lock your left and right or up and down movement.
/vl <pitch: RelativeAngle> [yaw: RelativeAngle] - Precisely (and relatively) position your view to a specific pitch and yaw./vl block <location: vec3> [track] - Lock (and optionally track) your view to a specific block (with relative positioning)./vl block view [track] - Lock (and optionally track) your view to the block in your crosshair./vl unlock - Unlock your view without losing your state./vl relock - Relock your view without losing your state.Disclaimer: I don't typically use these when I use this mod, so if they don't work, feel free to submit an issue on the GitHub page, or just PR it yourself. I am not so prideful about this fork that I won't accept PRs.