diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-11-15 23:57:55 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-11-15 23:57:55 +0100 |
| commit | b132826a3149eae8fe2e3d4aa4d69d289557e2a4 (patch) | |
| tree | 859e2d4b69e067ba81ff36ea9b9db7e81cbcf706 /src/main/kotlin/keybindings | |
| parent | 5632c1d50bb0319886fb6acd54df92bf01491532 (diff) | |
| download | Firmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.tar.gz Firmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.tar.bz2 Firmament-b132826a3149eae8fe2e3d4aa4d69d289557e2a4.zip | |
snapshot: mixin cleanup p1
Diffstat (limited to 'src/main/kotlin/keybindings')
| -rw-r--r-- | src/main/kotlin/keybindings/GenericInputButton.kt | 4 |
1 files changed, 4 insertions, 0 deletions
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 @@ -191,6 +192,9 @@ sealed interface GenericInputAction { 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) @JvmStatic |
