From b132826a3149eae8fe2e3d4aa4d69d289557e2a4 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 15 Nov 2025 23:57:55 +0100 Subject: snapshot: mixin cleanup p1 --- src/main/kotlin/keybindings/GenericInputButton.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/kotlin/keybindings') diff --git a/src/main/kotlin/keybindings/GenericInputButton.kt b/src/main/kotlin/keybindings/GenericInputButton.kt index 7a3d8d5..a352ce0 100644 --- a/src/main/kotlin/keybindings/GenericInputButton.kt +++ b/src/main/kotlin/keybindings/GenericInputButton.kt @@ -14,6 +14,7 @@ import kotlinx.serialization.json.buildJsonObject import kotlinx.serialization.json.int import kotlinx.serialization.json.put import net.minecraft.client.MinecraftClient +import net.minecraft.client.gui.Click import net.minecraft.client.input.KeyInput import net.minecraft.client.util.InputUtil import net.minecraft.client.util.MacWindowUtil @@ -190,6 +191,9 @@ sealed interface GenericInputAction { @JvmStatic fun mouse(mouseButton: Int): GenericInputAction = MouseInput(mouseButton) + @JvmStatic + fun mouse(click: Click): GenericInputAction = mouse(click.button()) + @JvmStatic fun of(input: KeyInput): GenericInputAction = key(input.keycode, input.scancode) -- cgit