blob: a773a93422731ad3df341563f566fc9680bb069f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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>()
}
|