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:
@@ -46,8 +46,6 @@ class LivingEcoBoss(
|
|||||||
ticker.cancel()
|
ticker.cancel()
|
||||||
entity.remove()
|
entity.remove()
|
||||||
tickers.forEach { it.onDeath(this, currentTick) }
|
tickers.forEach { it.onDeath(this, currentTick) }
|
||||||
forceLoadedChunks.forEach { it.isForceLoaded = false }
|
|
||||||
forceLoadedChunks.clear()
|
|
||||||
|
|
||||||
boss.markDead(mob.uniqueId)
|
boss.markDead(mob.uniqueId)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,4 +18,9 @@ class ChunkTicker : BossTicker {
|
|||||||
currentChunk.isForceLoaded = true
|
currentChunk.isForceLoaded = true
|
||||||
boss.forceLoadedChunks.add(currentChunk)
|
boss.forceLoadedChunks.add(currentChunk)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onDeath(boss: LivingEcoBoss, tick: Int) {
|
||||||
|
boss.forceLoadedChunks.forEach { it.isForceLoaded = false }
|
||||||
|
boss.forceLoadedChunks.clear()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user