log config GUI registration
This commit is contained in:
@@ -51,14 +51,17 @@ object BetterFoliageMod {
|
|||||||
|
|
||||||
// Add config GUI extension if Cloth Config is available
|
// Add config GUI extension if Cloth Config is available
|
||||||
val clothLoaded = tryDefault(false) { Class.forName("me.shedaniel.forge.clothconfig2.api.ConfigBuilder"); true }
|
val clothLoaded = tryDefault(false) { Class.forName("me.shedaniel.forge.clothconfig2.api.ConfigBuilder"); true }
|
||||||
if (clothLoaded) ctx.registerExtensionPoint(CONFIGGUIFACTORY) { BiFunction<Minecraft, Screen, Screen> { client, parent ->
|
if (clothLoaded) {
|
||||||
config.clothGuiRoot(
|
logger(this).log(Level.INFO, "Cloth Config found, registering GUI")
|
||||||
parentScreen = parent,
|
ctx.registerExtensionPoint(CONFIGGUIFACTORY) { BiFunction<Minecraft, Screen, Screen> { client, parent ->
|
||||||
prefix = listOf(MOD_ID),
|
config.clothGuiRoot(
|
||||||
background = ResourceLocation("minecraft:textures/block/spruce_log.png"),
|
parentScreen = parent,
|
||||||
saveAction = { configSpec.save() }
|
prefix = listOf(MOD_ID),
|
||||||
)
|
background = ResourceLocation("minecraft:textures/block/spruce_log.png"),
|
||||||
} }
|
saveAction = { configSpec.save() }
|
||||||
|
)
|
||||||
|
} }
|
||||||
|
}
|
||||||
|
|
||||||
// Accept-all version tester (we are client-only)
|
// Accept-all version tester (we are client-only)
|
||||||
ctx.registerExtensionPoint(DISPLAYTEST) {
|
ctx.registerExtensionPoint(DISPLAYTEST) {
|
||||||
|
|||||||
Reference in New Issue
Block a user