Fix the configuration screen registration in ForgeInit.kt
This commit is contained in:
parent
b34b49c27d
commit
bb9e9b382b
|
@ -4,16 +4,15 @@ import fr.username404.snowygui.Snowy
|
||||||
import fr.username404.snowygui.config.SnowyConfigScreen
|
import fr.username404.snowygui.config.SnowyConfigScreen
|
||||||
import fr.username404.snowygui.config.configScreenParent
|
import fr.username404.snowygui.config.configScreenParent
|
||||||
import fr.username404.snowygui.gui.feature.ButtonImpl
|
import fr.username404.snowygui.gui.feature.ButtonImpl
|
||||||
import net.minecraftforge.fml.ExtensionPoint
|
|
||||||
import net.minecraftforge.fml.ModList
|
import net.minecraftforge.fml.ModList
|
||||||
import net.minecraftforge.fml.common.Mod
|
import net.minecraftforge.fml.common.Mod
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent
|
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent
|
||||||
|
import net.minecraftforge.fmlclient.ConfigGuiHandler
|
||||||
import net.minecraftforge.forgespi.language.ModFileScanData
|
import net.minecraftforge.forgespi.language.ModFileScanData
|
||||||
import org.objectweb.asm.Type
|
import org.objectweb.asm.Type
|
||||||
import thedarkcolour.kotlinforforge.forge.FORGE_BUS
|
import thedarkcolour.kotlinforforge.forge.FORGE_BUS
|
||||||
import thedarkcolour.kotlinforforge.forge.LOADING_CONTEXT
|
import thedarkcolour.kotlinforforge.forge.LOADING_CONTEXT
|
||||||
import thedarkcolour.kotlinforforge.forge.MOD_BUS
|
import thedarkcolour.kotlinforforge.forge.MOD_BUS
|
||||||
import java.util.function.BiFunction
|
|
||||||
|
|
||||||
@Mod("snowygui")
|
@Mod("snowygui")
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
|
@ -21,8 +20,8 @@ class ForgeInit: Snowy() {
|
||||||
private fun initSetup(event: FMLClientSetupEvent) = atInit()
|
private fun initSetup(event: FMLClientSetupEvent) = atInit()
|
||||||
private fun configSetup(event: FMLClientSetupEvent) {
|
private fun configSetup(event: FMLClientSetupEvent) {
|
||||||
LOADING_CONTEXT.registerExtensionPoint(
|
LOADING_CONTEXT.registerExtensionPoint(
|
||||||
ExtensionPoint.CONFIGGUIFACTORY
|
ConfigGuiHandler.ConfigGuiFactory::class.java
|
||||||
) { BiFunction { _, parent -> configScreenParent = parent; SnowyConfigScreen } }
|
) { ConfigGuiHandler.ConfigGuiFactory { _, parent -> configScreenParent = parent; SnowyConfigScreen } }
|
||||||
}
|
}
|
||||||
override val annotatedButtons = ModList.get() // Forge-specific reflection
|
override val annotatedButtons = ModList.get() // Forge-specific reflection
|
||||||
.allScanData
|
.allScanData
|
||||||
|
|
Loading…
Reference in New Issue