I know that Keyboard Maestro can automate anything (), but I haven't figured this one out.
Inside Minecraft (I'm using the Java edition on MacOS), the mouse is captured by the app. While in the application, you don't see the mouse cursor move around the screen. Instead, a crosshair cursor stays in the center of the screen (the Target for any action), and mouse movement turns your character – towards the left, right, up, or down.
I've mostly experimented with Move Mouse (Just move) — since the normal action by the user is moving the mouse. I don't see any effect of the action when executed. But when I shift the mouse just a tiny bit once the macro is complete, the view shifts more than I move, which makes me think the mouse movement macro was registered... but doesn't take effect until the Real User acts.
I'd love any suggestions for doing this kind of "mouse" movement in Minecraft – or ideas for other tools if Keyboard Maestro isn't the right one for this job.