mojira.dev
MC-121705

Cursor is offset from actual mouse location when opening GUIs while moving mouse

The bug

When opening a GUI, the location the game thinks the cursor is at will not match the actual position of the mouse, the mouse was moved before opening

How to reproduce

  1. Move the mouse sideways by a few inches.

  2. Press e to open your inventory.

  3. Observe that either no item is hovered, or the item that is hovered is not the one under your cursor (if not the case, move the mouse faster before).

  4. Move the mouse, and then see that the hovered item resyncs.

  5. Close the inventory with esc, and then reopen it with e (do not move the mouse between these steps).

  6. Observe that the hovered item is the one under your mouse.

Notes

  • The offset seems to be the distance the mouse is moved since the last GUI was closed (acting as if the mouse was moving in a GUI and not being constantly snapped to the center for the camera)

  • Another way to reproduce that is to move the mouse about a 3rd of an inch to the left and then press esc, which will cause the "Options" button to be hovered.

Linked issues

Comments 2

But in my case the Bug happents in the main menu, what to do?

@@unknown, this report here has been resolved for a rather long time, so you are likely experiencing a different issue.
Please create a new report and attach a forced debug crash report. The crash report can be created by pressing F3 + C for at least 10 seconds in the main menu; the crash report file can be found under [minecraft/crash-reports/crash-<DATE>-client.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/].

pokechu22

Fry

Confirmed

Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47b, Minecraft 17w48a

Minecraft 17w49a

Retrieved