Use weak caches for custom textures

This commit is contained in:
Linnea Gräf
2024-09-24 11:40:15 +02:00
parent 64099bd262
commit 420f2a61e1
18 changed files with 308 additions and 78 deletions

View File

@@ -23,6 +23,8 @@ import moe.nea.firmament.util.MC
import moe.nea.firmament.util.SBData
import moe.nea.firmament.util.ScreenUtil
import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.collections.InstanceList
import moe.nea.firmament.util.collections.WeakCache
fun firmamentCommand() = literal("firmament") {
@@ -229,6 +231,18 @@ fun firmamentCommand() = literal("firmament") {
}
}
}
thenLiteral("caches") {
thenExecute {
source.sendFeedback(Text.literal("Caches:"))
WeakCache.allInstances.getAll().forEach {
source.sendFeedback(Text.literal(" - ${it.name}: ${it.size}"))
}
source.sendFeedback(Text.translatable("Instance lists:"))
InstanceList.allInstances.getAll().forEach {
source.sendFeedback(Text.literal(" - ${it.name}: ${it.size}"))
}
}
}
thenLiteral("mixins") {
thenExecute {
source.sendFeedback(Text.translatable("firmament.mixins.start"))