aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {