Assume that the modmenu screen is not null in ModMenuConf.kt

This commit is contained in:
Username404 2021-06-05 16:35:15 +02:00
parent 3c37ffcb81
commit e618407a94
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 5 deletions

View File

@ -7,10 +7,8 @@ import fr.username404.snowygui.config.configScreenParent
import net.minecraft.client.gui.screens.Screen
class ModMenuConf: ModMenuApi {
override fun getModConfigScreenFactory(): ConfigScreenFactory<Screen> {
return ConfigScreenFactory<Screen> { screen: Screen? ->
configScreenParent = screen!!
SnowyConfigScreen
}
override fun getModConfigScreenFactory() = ConfigScreenFactory { screen: Screen ->
configScreenParent = screen
SnowyConfigScreen
}
}