1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-18 21:24:53 +00:00
This commit is contained in:
Brady 2019-01-29 14:33:34 -06:00
parent 056742479e
commit 8f2b23f8f9
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -34,7 +34,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
public class MixinKeyBinding { public class MixinKeyBinding {
@Shadow @Shadow
public int pressTime; private int pressTime;
@Inject( @Inject(
method = "isKeyDown", method = "isKeyDown",
@ -57,7 +57,7 @@ public class MixinKeyBinding {
private void isPressed(CallbackInfoReturnable<Boolean> cir) { private void isPressed(CallbackInfoReturnable<Boolean> cir) {
// only the primary baritone forces keys // only the primary baritone forces keys
Boolean force = BaritoneAPI.getProvider().getPrimaryBaritone().getInputOverrideHandler().isInputForcedDown((KeyBinding) (Object) this); Boolean force = BaritoneAPI.getProvider().getPrimaryBaritone().getInputOverrideHandler().isInputForcedDown((KeyBinding) (Object) this);
if (force != null && force == false) { // <-- cursed if (force != null && !force) { // <-- cursed
if (pressTime > 0) { if (pressTime > 0) {
Helper.HELPER.logDirect("You're trying to press this mouse button but I won't let you"); Helper.HELPER.logDirect("You're trying to press this mouse button but I won't let you");
pressTime--; pressTime--;