Fabric API

Fabric API

106M Downloads

Stop minecraft from re-centering the mouse cursor when changing screens

Technici4n opened this issue ยท 3 comments

commented

Would be nice to have that feature in Fabric, if possible. Apparently Forge does it, it is quite convenient when going from one screen to the other, for example in AE2.

commented

Is there a vanilla bug report for this issue? Unfortunately, this issue isn't fixable for server-side mods so ideally this issue would be fixed in the vanilla client.

commented

The problem here is that ServerPlayerEntity#openScreenHandler sends a CloseScreenS2CPacket which causes minecraft to close the screen and grab the cursor, then re-release it right after when it receives the packet to open the new screen.

Forge avoids this issue because they call closeScreenHandler instead of closeHandledScreen from their networking hooks.

commented

Fixed by #2373.