Files
Firmament/src/main/kotlin/moe/nea/firmament/events/WorldKeyboardEvent.kt
Linnea Gräf 63d0d32e46 Clean up reuse comments
[no changelog]
2024-08-08 01:15:43 +02:00

19 lines
556 B
Kotlin

package moe.nea.firmament.events
import net.minecraft.client.option.KeyBinding
import moe.nea.firmament.keybindings.IKeyBinding
data class WorldKeyboardEvent(val keyCode: Int, val scanCode: Int, val modifiers: Int) : FirmamentEvent.Cancellable() {
companion object : FirmamentEventBus<WorldKeyboardEvent>()
fun matches(keyBinding: KeyBinding): Boolean {
return matches(IKeyBinding.minecraft(keyBinding))
}
fun matches(keyBinding: IKeyBinding): Boolean {
return keyBinding.matches(keyCode, scanCode, modifiers)
}
}