diff options
Diffstat (limited to 'src/main/java/moe')
-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); + } +} |