aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/events
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-13 17:32:10 +0200
committerLinnea Gräf <nea@nea.moe>2024-10-13 17:32:10 +0200
commite6142bb93619dee768fc18b87ffdd28558d4bcab (patch)
tree03df79712151f7579cd683c8340741ebb3191822 /src/main/kotlin/events
parentdaa63bd914a2f6c5e9b668abb8474884685ee818 (diff)
downloadFirmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.tar.gz
Firmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.tar.bz2
Firmament-e6142bb93619dee768fc18b87ffdd28558d4bcab.zip
Make pickaxe ability display use AbilityUtils
[no changelog]
Diffstat (limited to 'src/main/kotlin/events')
-rw-r--r--src/main/kotlin/events/HudRenderEvent.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/events/HudRenderEvent.kt b/src/main/kotlin/events/HudRenderEvent.kt
index 555b3c8..a773a93 100644
--- a/src/main/kotlin/events/HudRenderEvent.kt
+++ b/src/main/kotlin/events/HudRenderEvent.kt
@@ -4,10 +4,14 @@ package moe.nea.firmament.events
import net.minecraft.client.gui.DrawContext
import net.minecraft.client.render.RenderTickCounter
+import net.minecraft.world.GameMode
+import moe.nea.firmament.util.MC
/**
* Called when hud elements should be rendered, before the screen, but after the world.
*/
data class HudRenderEvent(val context: DrawContext, val tickDelta: RenderTickCounter) : FirmamentEvent() {
+ val isRenderingHud = !MC.options.hudHidden
+ val isRenderingCursor = MC.interactionManager?.currentGameMode != GameMode.SPECTATOR && isRenderingHud
companion object : FirmamentEventBus<HudRenderEvent>()
}