Closed Merith-TK closed 3 years ago
I poked around in the debugger and found that the mouse event packet (don't remember the class name I'm on mobile) isn't being sent to the server for turtle mouse_up's. I didn't have time to trace it further back but it's a bit of a head scratcher as turtles and computers share most of their code along that path and computers are working.
It's definitely a client side thing. having a program that just listens for mouse_up events shows that they fire when opening up the turtle GUI, but otherwise don't.
found the issue, will be committing fix soon :D
Actually I lie. I'm going to do a refactor, a lot of the code between computer and turtle is shared, and to prevent future issues like this from cropping up I'll have both GUIs extend from one class.
@hugeblank Can you explain the problem? I couldn't see anything off with the GuiTurtle code in its current state.
@hugeblank Can you explain the problem? I couldn't see anything off with the GuiTurtle code in its current state.
The issue was that GuiTurtle was missing the mouseRelease
method override. GuiComputer had it. This was why the issue couldn't be reproduced on computers.
I haven't looked at the newest commit, but in GuiComputer
there is this override handler:
@Override public boolean mouseReleased( double mouseX, double mouseY, int button )
It doesn't exist on forge because the super handler doesn't seem to consume the mouse release event over there. It does on fabric though so not having that same handler in GuiTurtle is what's causing the bug.
Ahhh, joys of Forge patching things (well, and fixing vanilla bugs).
Useful information to include:
turtles do not return mouse up event