Add price checker
This commit is contained in:
@@ -19,10 +19,16 @@
|
||||
package moe.nea.firmament.events
|
||||
|
||||
import net.minecraft.client.option.KeyBinding
|
||||
import moe.nea.firmament.keybindings.IKeyBinding
|
||||
|
||||
data class HandledScreenKeyPressedEvent(val keyCode: Int, val scanCode: Int, val modifiers: Int) : FirmamentEvent.Cancellable() {
|
||||
companion object : FirmamentEventBus<HandledScreenKeyPressedEvent>()
|
||||
|
||||
fun matches(keyBinding: KeyBinding): Boolean {
|
||||
return keyBinding.matchesKey(keyCode, scanCode)
|
||||
return matches(IKeyBinding.minecraft(keyBinding))
|
||||
}
|
||||
|
||||
fun matches(keyBinding: IKeyBinding): Boolean {
|
||||
return keyBinding.matches(keyCode, scanCode, modifiers)
|
||||
}
|
||||
}
|
||||
|
||||
15
src/main/kotlin/moe/nea/firmament/events/TooltipEvent.kt
Normal file
15
src/main/kotlin/moe/nea/firmament/events/TooltipEvent.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
package moe.nea.firmament.events
|
||||
|
||||
import net.minecraft.client.gui.tooltip.Tooltip
|
||||
import net.minecraft.client.item.TooltipContext
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.item.ItemStack
|
||||
|
||||
data class TooltipEvent(
|
||||
val itemStack: ItemStack,
|
||||
val tooltip: Tooltip,
|
||||
val tooltipContext: TooltipContext,
|
||||
val player: PlayerEntity?
|
||||
) : FirmamentEvent() {
|
||||
companion object : FirmamentEventBus<TooltipEvent>()
|
||||
}
|
||||
Reference in New Issue
Block a user