Posted October 4, 20169 yr I tried to set the 'pressed' value of the keyBindAttack binding to false via setKeyBindState during Key/MouseInputEvent as well as in the START phase of ClientTickEvent, but it doesn't cancel the clicking for some reason. How does it work? Edit: I think the problem is that the pressed value is assigned after the START and before END phase of client-tick, so the value specified in START just gets overridden. In case of keyBindAttack, it's possible to set Minecraft#leftClickCounter to something greater than 1 via reflection (very hacky D:), as this needs to be 0 (and gets reduced by 1 every tick) for attacking/breaking to be effective.
October 4, 20169 yr Author Is there something like this for Keys aswell? It's probably rare, but the player might change the binding to a key. If not, I can just find out if it's bound to a key or the mouse (mouse has negative keyCode) and use the reflection-method for keys.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.