diff options
author | nea <nea@nea.moe> | 2023-08-25 14:59:49 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-25 14:59:52 +0200 |
commit | ddc00804f1d2f909eae4461fb8d2e7571be107fc (patch) | |
tree | d684d2a46904f4daa21fcc63b8f693c590496a6f /src/main/java | |
parent | 784231941661a3108549a1b5cd499bc5f7de2e46 (diff) | |
download | Firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.gz Firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.bz2 Firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.zip |
Auto Sprint
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java b/src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java new file mode 100644 index 0000000..c057a93 --- /dev/null +++ b/src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java @@ -0,0 +1,16 @@ +package moe.nea.firmament.mixins; + +import moe.nea.firmament.features.fixes.Fixes; +import net.minecraft.client.option.KeyBinding; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(KeyBinding.class) +public class MixinKeyBinding { + @Inject(method = "isPressed", at = @At("HEAD"), cancellable = true) + public void onIsPressed(CallbackInfoReturnable<Boolean> cir) { + Fixes.INSTANCE.handleIsPressed((KeyBinding) (Object) this, cir); + } +} |