aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug/DebugLogger.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-04-01 13:40:31 +0200
committerLinnea Gräf <nea@nea.moe>2025-04-01 13:40:31 +0200
commit65038b7b370e5e8bc3e4e4d697a42b04a9c825e6 (patch)
tree87df7eabc820a22bcddd099130d73b664f43b68c /src/main/kotlin/features/debug/DebugLogger.kt
parent735b3b704f971521256f0b4e67e5e5bfb309e0f5 (diff)
downloadFirmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.tar.gz
Firmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.tar.bz2
Firmament-65038b7b370e5e8bc3e4e4d697a42b04a9c825e6.zip
feat: Improve performance of slime particles and armour with texture packsHEADmaster
Diffstat (limited to 'src/main/kotlin/features/debug/DebugLogger.kt')
-rw-r--r--src/main/kotlin/features/debug/DebugLogger.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt
index 2c6b962..9115956 100644
--- a/src/main/kotlin/features/debug/DebugLogger.kt
+++ b/src/main/kotlin/features/debug/DebugLogger.kt
@@ -10,6 +10,7 @@ class DebugLogger(val tag: String) {
companion object {
val allInstances = InstanceList<DebugLogger>("DebugLogger")
}
+
object EnabledLogs : DataHolder<MutableSet<String>>(serializer(), "DebugLogs", ::mutableSetOf)
init {
@@ -17,6 +18,7 @@ class DebugLogger(val tag: String) {
}
fun isEnabled() = DeveloperFeatures.isEnabled && EnabledLogs.data.contains(tag)
+ fun log(text: String) = log { text }
fun log(text: () -> String) {
if (!isEnabled()) return
MC.sendChat(Text.literal(text()))