I am trying to use the Java Robot class to move the player's camera. I am going to move it with a midi keyboard, I have all the other movements worked out, but mouse is much harder.
When I try:
Robot r = new Robot();
Point m = MouseInfo.getPointerInfo().getLocation();
int x = m.x;
int y =m.y;
if(shortMessage.getData1() == 78) {
r.mouseMove(x+shortMessage.getData2(),y);
}
else if(shortMessage.getData1() == 76) {
}
It makes the camera look down and turn around.
I really don't want to code a mod for Minecraft and keep it external.
I tried, with the same code, in the game Payday 2 and it worked flawlessly.