Fix config resets

This commit is contained in:
nea
2023-06-12 01:37:30 +02:00
parent a74a2fb1d5
commit a1fb86f653
3 changed files with 4 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
package moe.nea.firmament.mixins;public class MixinDrawContext {
}

View File

@@ -51,7 +51,6 @@ object FairySouls : FirmamentFeature {
object TConfig : ManagedConfig("fairy-souls") { object TConfig : ManagedConfig("fairy-souls") {
val displaySouls by toggle("show") { false } val displaySouls by toggle("show") { false }
val resetSouls by button("reset") { val resetSouls by button("reset") {
DConfig.data?.foundSouls?.clear() != null DConfig.data?.foundSouls?.clear() != null

View File

@@ -85,8 +85,9 @@ abstract class ManagedConfig(val name: String) {
e e
) )
} }
} else {
value = default()
} }
value = default()
} }
internal fun toJson(): JsonElement? { internal fun toJson(): JsonElement? {