Orientation is a fork of TheCritic's Critical Orientation mod with a few changes made to suit my needs, updated to modern Minecraft versions.
Pressing backslash (
\) will snap your camera angle to a multiple of 45 degrees. Change the keybind in settings if you so wish. There's also another key (
j) which can snap to a configurable angle.
/align command also allows you to align to an arbitrary amount of degrees.