Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle craftable button on Windows doesn't work well #65

Closed
boholder opened this issue Jul 2, 2023 · 0 comments · Fixed by #66
Closed

Toggle craftable button on Windows doesn't work well #65

boholder opened this issue Jul 2, 2023 · 0 comments · Fixed by #66

Comments

@boholder
Copy link
Collaborator

boholder commented Jul 2, 2023

Reproduced on both 1.19.3 and 1.20.1.

What's wrong

The toggle craftable button feature could only work once before close & re-open the inventory menu.
Somehow the mouse click event are executed BEFORE mouse moving event from the second time.

Put a helmet on the head to "see" it, or check the log:

[20:50:14] [Render thread/INFO] (minecraft_access) Group(name:Armour) 1/6 selected
[20:50:14] [Render thread/INFO] (minecraft_access) Speaking(interrupt:false)=  Armour Group selected
[20:50:14] [Render thread/INFO] (minecraft_access) Moving mouse to x:1731 y:588
[20:50:14] [Render thread/INFO] (minecraft_access) Speaking(interrupt:false)=  1 Iron HelmetDurability: 165 of 165When on Head:+2 Armor  <------ originally wearing a helmet

[20:50:21] [Render thread/INFO] (minecraft_access) Moving mouse to x:1637 y:586
[20:50:21] [Render thread/INFO] (minecraft_access) Performing left click at x:438 y:115
[20:50:21] [Render thread/INFO] (minecraft_access) Moving mouse to x:1731 y:588 after 100 milliseconds
[20:50:21] [Render thread/INFO] (minecraft_access) Recipe toggle key pressed, Showing all
[20:50:21] [Render thread/INFO] (minecraft_access) Speaking(interrupt:true)= Showing all
[20:50:21] [Timer-1/INFO] (minecraft_access) Moving mouse to x:1731 y:588

[20:50:22] [Render thread/INFO] (minecraft_access) Moving mouse to x:1637 y:586
[20:50:22] [Render thread/INFO] (minecraft_access) Performing left click at x:438 y:108  <-------------------- not the first y:115, helmet item are picked up
[20:50:22] [Render thread/INFO] (minecraft_access) Moving mouse to x:1731 y:588 after 100 milliseconds
[20:50:22] [Render thread/INFO] (minecraft_access) Recipe toggle key pressed, Showing craftable only
[20:50:22] [Render thread/INFO] (minecraft_access) Speaking(interrupt:true)= Showing craftable only
[20:50:22] [Timer-2/INFO] (minecraft_access) Moving mouse to x:1731 y:588

[20:50:22] [Render thread/INFO] (minecraft_access) Speaking(interrupt:true)=  Empty Slot
[20:50:23] [Render thread/INFO] (minecraft_access) Moving mouse to x:1637 y:586
[20:50:23] [Render thread/INFO] (minecraft_access) Performing left click at x:438 y:108 <-------------------- not the first y:115, helmet are put back to the helmet slot
[20:50:23] [Render thread/INFO] (minecraft_access) Moving mouse to x:1731 y:588 after 100 milliseconds
[20:50:23] [Render thread/INFO] (minecraft_access) Recipe toggle key pressed, Showing craftable only
[20:50:23] [Render thread/INFO] (minecraft_access) Speaking(interrupt:true)= Showing craftable only
[20:50:23] [Timer-3/INFO] (minecraft_access) Moving mouse to x:1731 y:588
[20:50:23] [Render thread/INFO] (minecraft_access) Speaking(interrupt:true)=  1 Iron HelmetDurability: 165 of 165When on Head:+2 Armor  <-----------after cursor is moved back to helmet slot, the mod speaks what in the slot

I guess the Windows kernel or whatever has its own command execution sequence inside it, we can't control that.
I've got a solution and will commit the PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant