diff options
author | Torui <44932079+ToruiDev@users.noreply.github.com> | 2022-03-26 22:41:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 22:41:10 +0100 |
commit | 507b9c2768ed6dafff82460fbe743a48f6fa631a (patch) | |
tree | 697e90d86ce8eac4ededb6b9328ea657fcf231aa | |
parent | bb935e5f731214377cbb55d7c00d3e7c0b49db4c (diff) | |
download | COFL-507b9c2768ed6dafff82460fbe743a48f6fa631a.tar.gz COFL-507b9c2768ed6dafff82460fbe743a48f6fa631a.tar.bz2 COFL-507b9c2768ed6dafff82460fbe743a48f6fa631a.zip |
Trial/mouse buttons (#52)
* try listening to mouse events too
* add missing import
-rw-r--r-- | src/main/java/de/torui/coflsky/EventRegistry.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/torui/coflsky/EventRegistry.java b/src/main/java/de/torui/coflsky/EventRegistry.java index 4b5186b..f8047e7 100644 --- a/src/main/java/de/torui/coflsky/EventRegistry.java +++ b/src/main/java/de/torui/coflsky/EventRegistry.java @@ -23,6 +23,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent; +import net.minecraftforge.fml.common.gameevent.InputEvent.MouseInputEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -42,6 +43,12 @@ public class EventRegistry { @SideOnly(Side.CLIENT) @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) + public void onMouseEvent(MouseInputEvent event) { + onEvent(null); + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true) public void onEvent(KeyInputEvent event) { if (CoflSky.keyBindings[0].isPressed()) { |