From 0a96dd618acba15269627c7eae8a2291fb2dc84a Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 14 Sep 2025 19:46:52 +0200 Subject: snapshot --- src/main/kotlin/features/debug/DebugLogger.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/kotlin/features/debug/DebugLogger.kt') diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt index 9115956..02073b7 100644 --- a/src/main/kotlin/features/debug/DebugLogger.kt +++ b/src/main/kotlin/features/debug/DebugLogger.kt @@ -4,6 +4,7 @@ import kotlinx.serialization.serializer import net.minecraft.text.Text import moe.nea.firmament.util.MC import moe.nea.firmament.util.collections.InstanceList +import moe.nea.firmament.util.data.Config import moe.nea.firmament.util.data.DataHolder class DebugLogger(val tag: String) { @@ -11,13 +12,14 @@ class DebugLogger(val tag: String) { val allInstances = InstanceList("DebugLogger") } + @Config object EnabledLogs : DataHolder>(serializer(), "DebugLogs", ::mutableSetOf) init { allInstances.add(this) } - fun isEnabled() = DeveloperFeatures.isEnabled && EnabledLogs.data.contains(tag) + fun isEnabled() = EnabledLogs.data.contains(tag) fun log(text: String) = log { text } fun log(text: () -> String) { if (!isEnabled()) return -- cgit