aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/DulkirMod.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-05-25 16:23:19 -0500
committeringlettronald <inglettronald@gmail.com>2023-05-25 16:23:19 -0500
commitf7b3746bcb1d48366760e9cdde9c8cdb8f89b645 (patch)
treef7621a7d4fcfdca27621266f289e9de5c802a6ed /src/main/kotlin/dulkirmod/DulkirMod.kt
parent093b826824391e06724933dcb74498516aecc8ab (diff)
downloadDulkirMod-f7b3746bcb1d48366760e9cdde9c8cdb8f89b645.tar.gz
DulkirMod-f7b3746bcb1d48366760e9cdde9c8cdb8f89b645.tar.bz2
DulkirMod-f7b3746bcb1d48366760e9cdde9c8cdb8f89b645.zip
performance improvements
Diffstat (limited to 'src/main/kotlin/dulkirmod/DulkirMod.kt')
-rw-r--r--src/main/kotlin/dulkirmod/DulkirMod.kt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt
index 6b955ef..70e029e 100644
--- a/src/main/kotlin/dulkirmod/DulkirMod.kt
+++ b/src/main/kotlin/dulkirmod/DulkirMod.kt
@@ -39,6 +39,7 @@ import kotlin.coroutines.EmptyCoroutineContext
class DulkirMod {
var lastLongUpdate: Long = 0
+ var lastLongerUpdate: Long = 0
@Mod.EventHandler
fun preInit(event: FMLPreInitializationEvent) {
@@ -117,6 +118,11 @@ class DulkirMod {
DragonFeatures.updateDragonDead()
lastLongUpdate = currTime
}
+
+ if (currTime - lastLongerUpdate > 5000) { // longer update
+ MemoryLeakFix.clearBlankStands()
+ lastLongerUpdate = currTime
+ }
}
@SubscribeEvent