diff options
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java')
| -rw-r--r-- | src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java b/src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java index 15fc5df..97d524a 100644 --- a/src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java +++ b/src/main/java/moe/nea/firmament/mixins/MaintainKeyboardStatePatch.java @@ -1,17 +1,17 @@ package moe.nea.firmament.mixins; import moe.nea.firmament.keybindings.FirmamentKeyboardState; -import net.minecraft.client.Keyboard; -import net.minecraft.client.input.KeyInput; +import net.minecraft.client.KeyboardHandler; +import net.minecraft.client.input.KeyEvent; 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.CallbackInfo; -@Mixin(Keyboard.class) +@Mixin(KeyboardHandler.class) public class MaintainKeyboardStatePatch { - @Inject(method = "onKey", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/InactivityFpsLimiter;onInput()V")) - private void onKeyInput(long window, int action, KeyInput input, CallbackInfo ci) { + @Inject(method = "keyPress", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/FramerateLimitTracker;onInputReceived()V")) + private void onKeyInput(long window, int action, KeyEvent input, CallbackInfo ci) { FirmamentKeyboardState.INSTANCE.maintainState(input, action); } } |
