aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-01 20:56:34 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-01 20:56:47 +0200
commitfa0506c05ae2c509c39161a9b1487fafa4b8b5c9 (patch)
treed41130cb331080af7c099af95a737abb879d3248
parentf28c80c99fd6b269763533a73a5b13903c7ae61c (diff)
downloadveloxcaelo-fa0506c05ae2c509c39161a9b1487fafa4b8b5c9.tar.gz
veloxcaelo-fa0506c05ae2c509c39161a9b1487fafa4b8b5c9.tar.bz2
veloxcaelo-fa0506c05ae2c509c39161a9b1487fafa4b8b5c9.zip
Clear CIT cache on repo reload
-rw-r--r--src/main/java/moe/nea/caelo/optifine/OptifineCustomItemCache.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/caelo/optifine/OptifineCustomItemCache.kt b/src/main/java/moe/nea/caelo/optifine/OptifineCustomItemCache.kt
index f343958..ed5068e 100644
--- a/src/main/java/moe/nea/caelo/optifine/OptifineCustomItemCache.kt
+++ b/src/main/java/moe/nea/caelo/optifine/OptifineCustomItemCache.kt
@@ -3,6 +3,8 @@ package moe.nea.caelo.optifine
import moe.nea.caelo.CaeloCommand
import moe.nea.caelo.config.CConfig
import moe.nea.caelo.event.NeaTickEvent
+import moe.nea.caelo.event.ResourceReloadEvent
+import moe.nea.caelo.optifine.OptifineRegexCache.cache
import moe.nea.caelo.util.Histogram
import moe.nea.caelo.util.MC
import net.minecraft.item.ItemStack
@@ -65,6 +67,11 @@ object OptifineCustomItemCache {
private var cacheStats = CacheStats()
@SubscribeEvent
+ fun onResourcePackReload(resourceReload: ResourceReloadEvent) {
+ map.clear()
+ }
+
+ @SubscribeEvent
fun onTick(event: NeaTickEvent) {
var removeCount = 0
while (true) {