Don't create "top most" config declaration

Because it is not required and clutters vision
This commit is contained in:
DBotThePony 2022-11-25 14:15:21 +07:00
parent 5c1aaaa352
commit 58e5dfb505
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 2 additions and 10 deletions

View File

@ -6,13 +6,10 @@ import net.minecraftforge.fml.config.ModConfig
object ClientConfig {
private val specBuilder = ForgeConfigSpec.Builder()
@Suppress("JoinDeclarationAndAssignment")
private val spec: ForgeConfigSpec
private var registered = false
init {
specBuilder.comment("Clientside Config").push("client")
}
var EXOPACK_INVENTORY_ROWS: Int by specBuilder
.comment("Amount of inventory rows to show when wearing Exosuit")
.defineInRange("exosuitInventoryRows", 3, 3, 6)
@ -26,7 +23,6 @@ object ClientConfig {
.define("exopackFreeScroll", true)
init {
specBuilder.pop()
spec = specBuilder.build()
}

View File

@ -33,6 +33,7 @@ interface ConciseBalanceValues {
object ServerConfig {
private val specBuilder = ForgeConfigSpec.Builder()
@Suppress("JoinDeclarationAndAssignment")
private val spec: ForgeConfigSpec
private var registered = false
@ -78,10 +79,6 @@ object ServerConfig {
return obj
}
init {
specBuilder.comment("Serverside config, holds shared values that are required to be read by both client and server.").push("server")
}
val LABORATORY_LAMP_LIGHT_LENGTH: Int by specBuilder.comment("In blocks").defineInRange("laboratoryLampLightLength", 6, 1, 128)
init {
@ -262,7 +259,6 @@ object ServerConfig {
}
init {
specBuilder.pop()
spec = specBuilder.build()
}