-
Notifications
You must be signed in to change notification settings - Fork 48
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
Minebot and Zyin'sHud #108
Comments
I finally found the most likely cause of the crash: it has to do with how Minebot injects the key presses by overwriting the keybind with a subclassed one. The solution
I will do a test with Zyin's Hud. UPDATE I tested it with a modified version of Zyin's mod and got this right before the crash:
|
Workaround: Decrease the key codes Minebot uses to be less than 256 (find some that are not conflicting with your physical keyboard). Fix: Use the key objects the way Minecraft wants you to use them: Zyin055/zyinhud#59 |
Hey @michaelzangl I don't get this: why is the keycode 501 and not -99? Wouldn't make sense to send the same of the original keybind? |
No, it would not. The bot is using sort of a virtual keyboard. Otherwise, it would conflict with your real keyboard. |
Uh, so you have another Keyboard object somewhere? |
The game crashes when some minebot commands are issued.
walk
seems not to be affected. The stack trace points at @Zyin055's HUD mod key handling, but the crash is triggered by/minebot store
and a few other minebot actions.UPDATE
Here is the actual functions mentioned by the stack trace:
ZyinHUDKeyHandlers.FireUseBlockEvents
->
Keyboard.isKeyDown
->
ByteBuffer.get
I investigated the sources and as the
ByteBuffer.get
page says it throwsSo the number returned by
mc.gameSettings.keyBindUseItem.getKeyCode()
is negative or smaller than the buffer's limit.I have unbinded most of zyinhud keys so maybe that can be the cause.
UPDATE 2
I'm starting to believe that this has to do with how Minebot simulates key presses.
Here it is the stack trace for completeness:
The text was updated successfully, but these errors were encountered: