9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-19 15:09:17 +00:00

Compare commits

...

17 Commits

Author SHA1 Message Date
Auxilor
ad827f2b65 libreforge-updater 2022-08-28 15:40:32 +01:00
Auxilor
e8b8dcd2c4 libreforge-updater 2022-08-27 11:22:55 +01:00
Auxilor
e54660cf5e libreforge-updater 2022-08-24 12:52:49 +02:00
Auxilor
7a21d1897d libreforge-updater 2022-08-24 12:50:14 +02:00
Auxilor
64726f665f libreforge-updater 2022-08-24 11:57:32 +02:00
Auxilor
e4fdaeec1d libreforge-updater 2022-08-23 11:07:42 +02:00
Auxilor
3c5fbd6151 libreforge-updater 2022-08-22 12:46:27 +02:00
Auxilor
4329431994 libreforge-updater 2022-08-20 10:00:02 +02:00
Auxilor
c55692e89f libreforge-updater 2022-08-17 14:21:54 +02:00
Auxilor
03466f7892 libreforge-updater 2022-08-17 12:09:45 +02:00
Auxilor
1a6ebd4455 libreforge-updater 2022-08-16 18:45:53 +02:00
Auxilor
486f071dea libreforge-updater 2022-08-14 17:30:33 +02:00
Auxilor
fb4eac5e5e Updated to 8.67.1 2022-08-13 12:12:27 +02:00
Will FP
49d1d3f054 Merge pull request #47 from grzybeek/chunkticker
small chunkticker code cleanup
2022-08-13 12:00:09 +02:00
Auxilor
6dc7426146 libreforge-updater 2022-08-13 11:58:15 +02:00
grzybeek
05cf399e77 remove useless mob getter 2022-07-21 17:07:37 +02:00
grzybeek
de2b8f7526 small chunkticker code cleanup 2022-07-21 17:02:42 +02:00
4 changed files with 11 additions and 11 deletions

View File

@@ -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'

View File

@@ -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}}"
}
}

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()
}
}

View File

@@ -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