9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-23 08:59:31 +00:00

small chunkticker code cleanup

This commit is contained in:
grzybeek
2022-07-21 17:02:42 +02:00
parent 23085e74e2
commit de2b8f7526
2 changed files with 5 additions and 2 deletions

View File

@@ -46,8 +46,6 @@ class LivingEcoBoss(
ticker.cancel()
entity.remove()
tickers.forEach { it.onDeath(this, currentTick) }
forceLoadedChunks.forEach { it.isForceLoaded = false }
forceLoadedChunks.clear()
boss.markDead(mob.uniqueId)
}

View File

@@ -18,4 +18,9 @@ class ChunkTicker : BossTicker {
currentChunk.isForceLoaded = true
boss.forceLoadedChunks.add(currentChunk)
}
override fun onDeath(boss: LivingEcoBoss, tick: Int) {
boss.forceLoadedChunks.forEach { it.isForceLoaded = false }
boss.forceLoadedChunks.clear()
}
}