Add HudHandler.kt
This commit is contained in:
parent
c2b87fddbc
commit
bd0ac48e11
|
@ -0,0 +1,20 @@
|
||||||
|
@file:Suppress("UNUSED")
|
||||||
|
package fr.username404.snowygui.forge
|
||||||
|
|
||||||
|
import fr.username404.snowygui.EventSnowy
|
||||||
|
import net.minecraftforge.api.distmarker.Dist
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent
|
||||||
|
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||||
|
import net.minecraftforge.fml.common.Mod
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(Dist.CLIENT)
|
||||||
|
object HudHandler: EventSnowy {
|
||||||
|
override val type: String = "HudRender"
|
||||||
|
@SubscribeEvent
|
||||||
|
@JvmStatic
|
||||||
|
fun handleRendering(event: RenderGameOverlayEvent.Post) {
|
||||||
|
if (event.type == RenderGameOverlayEvent.ElementType.ALL) {
|
||||||
|
fire(event.matrixStack)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue