Very simple. Take a stick, right click on a block. It'll rotate itself around N/W/S/E. If you sneak, it'll do up/down as well. Or that might be backwards. If something is on an X/Y/Z axis, like a log, it cycles that. There is a small cooldown to make sure multiple clicks don't get registered by accident.
Started in MCReator because idk how to setup this environment, finished with using text editing because my goodness does that auto-generated stuff get bad fast.