book mouse error
1dardo1 opened this issue ยท 13 comments
Minecraft Version
1.16.5
Forge Version
36.2.4
Mantle Version
1.16.5-1.6.127
Tinkers' Construct Version
1.16.5-3.2.1.296
Describe your issue
the mouse is detected to the left of the screen so you cant point what u whant
for example in this photo my mouse is on the bottom right arrow bot detected on the left of the book
Crash Report
No response
Reproduced with only Tinkers' Construct?
Yes
Other mods required
No response
- Confirm you have checked the roadmap, what's new, and the FAQ for your issue
- Confirm you have searched the tracker to see if your issue already exists
- Confirm you are not using performance enhancers, such as optifine
Right so here is what we know, it happens on macs, and so far my assumption is being due towards the resolutions of macs, I've yet to see one that drastic but.
I am also experiencing the same issue (M1 MBA, 2560x1600 display), using version 3.2.1.296 on 1.16.5.
It is not related to the OS, it is based on aspect ratio, I tried an external monitor, with a 16:9 aspect ratio and it was aligned properly, so if your monitor supports forced 16:10 aspect ratio you should be able to replicate it
I have a 16:10 monitor that works completely fine with the books, I get 0 mouse positioning errors. It's not the specific ratio otherwise it would affect my monitor.
I would like to help with this, and after some experiments it seems to be with a problem with Mantle SizedBookElement
. Is there a way to fix this in dev environment?
To be exact, the problem seems to be that the distance is calculated twice. for elements at (x,y), mouse needs to be on (2x,2y) for the tooltip to show
I know how to fix it:
In slimeknights.mantle.client.screen.book.BookScreen.getMouseX()
use getScreenWidth()
instead of getWidth()
(and similarly, in getMouseY()
, use getScreenHeight()
instead of getHeight()
) should fix everything
In mac, getWidth()
returns 2x of getScreenWidth()
, and getHeight()
returns 2x of getScreenHeight()
. If they return the same thing in windows, it should not break windows.
Fixed by SlimeKnights/Mantle#182, which is in the latest 1.18.2 Mantle release. Will likely release the fix on 1.18.1 after it gets a bit more testing.