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

Compare commits

...

26 Commits

Author SHA1 Message Date
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
Auxilor
00c5ead347 libreforge-updater 2022-08-05 18:41:40 +01:00
Auxilor
9bd501dfbe libreforge-updater 2022-08-05 18:39:49 +01:00
Auxilor
67d55bbdc2 libreforge-updater 2022-08-04 13:03:36 +01:00
Auxilor
46aa086366 lang 2022-08-04 12:38:01 +01:00
Auxilor
9f00334ea4 lang 2022-08-04 12:31:24 +01:00
Auxilor
e6db159bfb libreforge-updater 2022-08-04 12:26:42 +01:00
Auxilor
3df7b75737 libreforge-updater 2022-08-04 12:24:14 +01:00
Auxilor
c243a425b3 libreforge-updater 2022-08-02 16:26:52 +01:00
Auxilor
e57fe61d22 libreforge-updater 2022-08-02 16:21:24 +01:00
Auxilor
9830aed484 libreforge-updater 2022-08-02 16:16:46 +01:00
Auxilor
999b89bcb0 libreforge-updater 2022-08-01 11:19:06 +01:00
Auxilor
e7f326efbb libreforge-updater 2022-07-29 17:50:41 +01:00
Auxilor
0cb5b0b7b7 libreforge-updater 2022-07-27 20:17:09 +01:00
Auxilor
8e2d901e9b Updated to 8.63.2 2022-07-26 14:41:50 +01:00
Auxilor
724eede36e Fixed boss death tracking 2022-07-26 14:41:22 +01:00
Auxilor
01a2cc7118 libreforge-updater 2022-07-25 17:53:55 +01:00
Auxilor
20aace3727 libreforge-updater 2022-07-25 17:02:32 +01:00
Auxilor
ec9d4c0dd6 libreforge-updater 2022-07-24 22:49:25 +01:00
Auxilor
b3a0c1fa67 libreforge-updater 2022-07-24 21:50:54 +01:00
Auxilor
88294a17cd libreforge-updater 2022-07-23 17:42:53 +01: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
5 changed files with 14 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ allprojects {
dependencies {
compileOnly 'com.willfp:eco:6.35.1'
implementation 'com.willfp:libreforge:3.76.1'
implementation 'com.willfp:libreforge:3.83.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

@@ -6,6 +6,7 @@ import com.willfp.ecobosses.bosses.Bosses
import com.willfp.ecobosses.events.BossKillEvent
import org.bukkit.Bukkit
import org.bukkit.event.EventHandler
import org.bukkit.event.EventPriority
import org.bukkit.event.Listener
import org.bukkit.event.entity.EntityDeathEvent
@@ -25,7 +26,8 @@ class DeathListeners : Listener {
}
@EventHandler(
ignoreCancelled = true
ignoreCancelled = true,
priority = EventPriority.HIGHEST
)
fun handle(event: EntityDeathEvent) {
val boss = Bosses[event.entity] ?: return

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 Jul 22 14:20:45 BST 2022
version=8.61.1
#Sun Aug 14 17:30:33 CEST 2022
version=8.68.0
plugin-name=EcoBosses