From 5ed74f2df49c93ed1617520a935078b59ad7e195 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 1 Sep 2024 22:21:19 +0200 Subject: Add per compat project event listeners [no changelog] --- src/main/kotlin/gui/hud/MoulConfigHud.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/gui/hud/MoulConfigHud.kt') diff --git a/src/main/kotlin/gui/hud/MoulConfigHud.kt b/src/main/kotlin/gui/hud/MoulConfigHud.kt index e77d9af..e99b069 100644 --- a/src/main/kotlin/gui/hud/MoulConfigHud.kt +++ b/src/main/kotlin/gui/hud/MoulConfigHud.kt @@ -37,7 +37,7 @@ abstract class MoulConfigHud( init { require(name.matches("^[a-z_/]+$".toRegex())) - HudRenderEvent.subscribe { + HudRenderEvent.subscribe("MoulConfigHud:render") { if (!shouldRender()) return@subscribe val renderContext = componentWrapper.createContext(it.context) if (fragment == null) @@ -50,7 +50,7 @@ abstract class MoulConfigHud( fragment!!.root.render(renderContextTranslated) it.context.matrices.pop() } - FinalizeResourceManagerEvent.subscribe { + FinalizeResourceManagerEvent.subscribe("MoulConfigHud:finalizeResourceManager") { MC.resourceManager.registerReloader(object : SynchronousResourceReloader { override fun reload(manager: ResourceManager?) { fragment = null -- cgit