From 83b82ba1d962ddca0479cdc0389ed3dce1f482bd Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sun, 2 Feb 2025 21:53:41 +0100 Subject: [PATCH] OOPS! use the mod event bus for initialisation Signed-off-by: Username404-59 --- .../src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neoforge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt b/neoforge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt index eca15bf..5db8073 100644 --- a/neoforge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt +++ b/neoforge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt @@ -28,8 +28,8 @@ class ForgeInit(container: ModContainer): Snowy() { .map { Class.forName((it!!.javaClass.getDeclaredField("clazz").apply { isAccessible = true }.get(it) as Type).className).asSubclass(ButtonImpl::class.java)} .toSet() init { + container.eventBus!!.addListener(this@ForgeInit::initSetup) NeoForge.EVENT_BUS.run { - addListener(this@ForgeInit::initSetup) register(EndTickHandler) register(MiscHandlers) register(HudHandler)