aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-08-25 14:59:49 +0200
committernea <nea@nea.moe>2023-08-25 14:59:52 +0200
commitddc00804f1d2f909eae4461fb8d2e7571be107fc (patch)
treed684d2a46904f4daa21fcc63b8f693c590496a6f /src/main/java/moe/nea/firmament
parent784231941661a3108549a1b5cd499bc5f7de2e46 (diff)
downloadFirmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.gz
Firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.tar.bz2
Firmament-ddc00804f1d2f909eae4461fb8d2e7571be107fc.zip
Auto Sprint
Diffstat (limited to 'src/main/java/moe/nea/firmament')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/MixinKeyBinding.java16
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);
+ }
+}