diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/internal/mixin')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/internal/mixin/MinecraftMixin.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MinecraftMixin.java b/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MinecraftMixin.java index 8a28bed..6308fdb 100644 --- a/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MinecraftMixin.java +++ b/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MinecraftMixin.java @@ -74,4 +74,14 @@ public class MinecraftMixin { private void onDeltaTickTimerUpdate(CallbackInfo ci) { EventManager.INSTANCE.post(new TimerUpdateEvent(timer, true)); } + + @Inject(method = "runTick", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/common/FMLCommonHandler;fireKeyInput()V")) + private void onKeyEvent(CallbackInfo ci) { + EventManager.INSTANCE.post(new KeyInputEvent()); + } + + @Inject(method = "runTick", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/common/FMLCommonHandler;fireMouseInput()V")) + private void onMouseEvent(CallbackInfo ci) { + EventManager.INSTANCE.post(new MouseInputEvent()); + } } |