PaleoCrafter

Get mouse position

Mar 5th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
  2. int i = scaledresolution.getScaledWidth();
  3. int j = scaledresolution.getScaledHeight();
  4. int mouseX = Mouse.getX() * i / this.mc.displayWidth;
  5. int mousey = j - Mouse.getY() * j / this.mc.displayHeight - 1;
Advertisement
Add Comment
Please, Sign In to add comment