Tinkers Construct

Tinkers Construct

160M Downloads

book mouse error

1dardo1 opened this issue ยท 13 comments

commented

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

Captura de pantalla 2021-11-29 a las 10 36 49

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
commented

Are you perhaps using a Mac or a non 16:9 resolution?

commented

i have a macbook

commented

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.

commented

is there any solutions nowadays ?

commented

I am also experiencing the same issue (M1 MBA, 2560x1600 display), using version 3.2.1.296 on 1.16.5.

commented

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

commented

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.

commented

Is there any progress on this?

commented

I don't own a mac. Makes it really hard to fix a bug that happens only on mac

commented

Oh ok, I understand, but if you need me to test anything, I wouldn't mind.

commented

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

commented

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.

commented

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.