diff options
author | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 18:18:44 +0200 |
---|---|---|
committer | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 18:18:44 +0200 |
commit | 1c7d76cd3f6df63a71baf615369a493b65ed0409 (patch) | |
tree | 0f1e90abd85c0c1a11f4673d35959d44d5452410 | |
parent | d07696bbfa5d43a3354cd24c872cd0abca1d9afe (diff) | |
download | DulkirMod-1c7d76cd3f6df63a71baf615369a493b65ed0409.tar.gz DulkirMod-1c7d76cd3f6df63a71baf615369a493b65ed0409.tar.bz2 DulkirMod-1c7d76cd3f6df63a71baf615369a493b65ed0409.zip |
rename memory leak fix, fix wrong check
-rw-r--r-- | src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt (renamed from src/main/kotlin/dulkirmod/features/ListClear.kt) | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/dulkirmod/features/ListClear.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt index 2a574d2..a4dfc9b 100644 --- a/src/main/kotlin/dulkirmod/features/ListClear.kt +++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt @@ -6,12 +6,12 @@ import net.minecraft.entity.Entity import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent -object ListClear { +object MemoryLeakFix { var lastClear = System.currentTimeMillis() @SubscribeEvent fun onTick(event: TickEvent.ClientTickEvent) { - if (!Config.crimsonIslesMemoryLeakPatch) + if (!Config.crimsonIslesMemoryLeakPatch) return if (System.currentTimeMillis() - lastClear >= 30000L) { val world = mc.theWorld ?: return |