aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug/DebugLogger.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-09-24 11:40:15 +0200
committerLinnea Gräf <nea@nea.moe>2024-09-24 11:40:15 +0200
commit420f2a61e1cc64d68bf03825e8fd70cf49ac6a01 (patch)
tree540f2beaf99bda96af3c145cbfe81faebba76bee /src/main/kotlin/features/debug/DebugLogger.kt
parent64099bd2628490b06392766c6d1b9425f26788a3 (diff)
downloadfirmament-420f2a61e1cc64d68bf03825e8fd70cf49ac6a01.tar.gz
firmament-420f2a61e1cc64d68bf03825e8fd70cf49ac6a01.tar.bz2
firmament-420f2a61e1cc64d68bf03825e8fd70cf49ac6a01.zip
Use weak caches for custom textures
Diffstat (limited to 'src/main/kotlin/features/debug/DebugLogger.kt')
-rw-r--r--src/main/kotlin/features/debug/DebugLogger.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/DebugLogger.kt b/src/main/kotlin/features/debug/DebugLogger.kt
index ab06030..69a191d 100644
--- a/src/main/kotlin/features/debug/DebugLogger.kt
+++ b/src/main/kotlin/features/debug/DebugLogger.kt
@@ -3,8 +3,15 @@ package moe.nea.firmament.features.debug
import net.minecraft.text.Text
import moe.nea.firmament.util.MC
+import moe.nea.firmament.util.collections.InstanceList
class DebugLogger(val tag: String) {
+ companion object {
+ val allInstances = InstanceList<DebugLogger>("DebugLogger")
+ }
+ init {
+ allInstances.add(this)
+ }
fun isEnabled() = DeveloperFeatures.isEnabled // TODO: allow filtering by tag
fun log(text: () -> String) {
if (!isEnabled()) return