diff --git a/forge/src/main/kotlin/fr/username404/snowygui/forge/HudHandler.kt b/forge/src/main/kotlin/fr/username404/snowygui/forge/HudHandler.kt new file mode 100644 index 0000000..1957b99 --- /dev/null +++ b/forge/src/main/kotlin/fr/username404/snowygui/forge/HudHandler.kt @@ -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) + } + } +} \ No newline at end of file