mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-19 15:09:17 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad827f2b65 | ||
|
|
e8b8dcd2c4 | ||
|
|
e54660cf5e | ||
|
|
7a21d1897d | ||
|
|
64726f665f | ||
|
|
e4fdaeec1d | ||
|
|
3c5fbd6151 | ||
|
|
4329431994 | ||
|
|
c55692e89f | ||
|
|
03466f7892 | ||
|
|
1a6ebd4455 | ||
|
|
486f071dea | ||
|
|
fb4eac5e5e | ||
|
|
49d1d3f054 | ||
|
|
6dc7426146 | ||
|
|
05cf399e77 | ||
|
|
de2b8f7526 |
@@ -63,7 +63,7 @@ allprojects {
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.willfp:eco:6.35.1'
|
||||
implementation 'com.willfp:libreforge:3.82.0'
|
||||
implementation 'com.willfp:libreforge:3.88.0'
|
||||
implementation 'org.joml:joml:1.10.4'
|
||||
|
||||
compileOnly 'org.jetbrains:annotations:23.0.0'
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.entity.Mob
|
||||
|
||||
class LivingEcoBoss(
|
||||
plugin: EcoPlugin,
|
||||
private val mob: Mob,
|
||||
val entity: Mob,
|
||||
val boss: EcoBoss,
|
||||
private val tickers: Set<BossTicker>
|
||||
) {
|
||||
@@ -17,9 +17,6 @@ class LivingEcoBoss(
|
||||
}
|
||||
}.apply { runTaskTimer(1, 1) }
|
||||
|
||||
val entity: Mob
|
||||
get() = mob
|
||||
|
||||
val chunk: Chunk
|
||||
get() = entity.location.chunk
|
||||
|
||||
@@ -46,13 +43,11 @@ class LivingEcoBoss(
|
||||
ticker.cancel()
|
||||
entity.remove()
|
||||
tickers.forEach { it.onDeath(this, currentTick) }
|
||||
forceLoadedChunks.forEach { it.isForceLoaded = false }
|
||||
forceLoadedChunks.clear()
|
||||
|
||||
boss.markDead(mob.uniqueId)
|
||||
boss.markDead(entity.uniqueId)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "LivingEcoBoss{boss=${boss}, uuid=${mob.uniqueId}}"
|
||||
return "LivingEcoBoss{boss=${boss}, uuid=${entity.uniqueId}}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#libreforge-updater
|
||||
#Fri Aug 05 18:41:40 BST 2022
|
||||
version=8.67.0
|
||||
#Sun Aug 28 15:40:32 BST 2022
|
||||
version=8.73.0
|
||||
plugin-name=EcoBosses
|
||||
|
||||
Reference in New Issue
Block a user