diff --git a/forge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt b/forge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt index df6744a..c932b59 100644 --- a/forge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt +++ b/forge/src/main/kotlin/fr/username404/snowygui/forge/ForgeInit.kt @@ -4,16 +4,15 @@ import fr.username404.snowygui.Snowy import fr.username404.snowygui.config.SnowyConfigScreen import fr.username404.snowygui.config.configScreenParent import fr.username404.snowygui.gui.feature.ButtonImpl -import net.minecraftforge.fml.ExtensionPoint import net.minecraftforge.fml.ModList import net.minecraftforge.fml.common.Mod import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent +import net.minecraftforge.fmlclient.ConfigGuiHandler import net.minecraftforge.forgespi.language.ModFileScanData import org.objectweb.asm.Type import thedarkcolour.kotlinforforge.forge.FORGE_BUS import thedarkcolour.kotlinforforge.forge.LOADING_CONTEXT import thedarkcolour.kotlinforforge.forge.MOD_BUS -import java.util.function.BiFunction @Mod("snowygui") @Suppress("UNUSED_PARAMETER") @@ -21,8 +20,8 @@ class ForgeInit: Snowy() { private fun initSetup(event: FMLClientSetupEvent) = atInit() private fun configSetup(event: FMLClientSetupEvent) { LOADING_CONTEXT.registerExtensionPoint( - ExtensionPoint.CONFIGGUIFACTORY - ) { BiFunction { _, parent -> configScreenParent = parent; SnowyConfigScreen } } + ConfigGuiHandler.ConfigGuiFactory::class.java + ) { ConfigGuiHandler.ConfigGuiFactory { _, parent -> configScreenParent = parent; SnowyConfigScreen } } } override val annotatedButtons = ModList.get() // Forge-specific reflection .allScanData