diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-06 00:01:30 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-05 16:01:30 +0200 |
commit | eb7fd3da94cec90674e29e93ca0d744e2a2889fb (patch) | |
tree | a83d663c1229207b0cf5977290aa2609ba22efec /src/main/java/at/hannibal2/skyhanni/features/event | |
parent | 5a04ad230cc4fb94884b34f795124d3b65af07ea (diff) | |
download | skyhanni-eb7fd3da94cec90674e29e93ca0d744e2a2889fb.tar.gz skyhanni-eb7fd3da94cec90674e29e93ca0d744e2a2889fb.tar.bz2 skyhanni-eb7fd3da94cec90674e29e93ca0d744e2a2889fb.zip |
Backend: More second passed (#1899)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/event')
4 files changed, 10 insertions, 16 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt index 005d9b8f1..887839d27 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.BurrowDetectEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer @@ -32,9 +32,8 @@ object AllBurrowsList { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!isEnabled()) return - if (!event.repeatSeconds(1)) return val burrowLocations = burrowLocations ?: return val range = 5..70 diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt index 1a8fde100..330727347 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer import at.hannibal2.skyhanni.utils.LorenzColor @@ -37,13 +37,11 @@ class EasterEggWaypoints { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!config.allWaypoints && !config.allEntranceWaypoints) return if (!isEnabled()) return - if (event.repeatSeconds(1)) { - isEgg = checkScoreboardEasterSpecific() - } + isEgg = checkScoreboardEasterSpecific() if (isEgg) { if (config.onlyClosest) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt index da267da07..8eb9e1dc1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer import at.hannibal2.skyhanni.utils.LorenzColor @@ -38,13 +38,11 @@ class BasketWaypoints { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!config.allWaypoints && !config.allEntranceWaypoints) return if (!isEnabled()) return - if (event.repeatSeconds(1)) { - isHalloween = checkScoreboardHalloweenSpecific() - } + isHalloween = checkScoreboardHalloweenSpecific() if (isHalloween) { if (config.onlyClosest) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt index d8ff05378..f5f05f8ca 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/spook/TheGreatSpook.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.event.spook import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SoundUtils @@ -19,9 +19,8 @@ class TheGreatSpook { private var notificationSeconds = 0 @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (isAllDisabled()) return - if (!event.repeatSeconds(1)) return if (isTimerEnabled() || isNotificationEnabled()) displayTimer = checkTabList(" §r§cPrimal Fears§r§7: ") if (isFearStatEnabled()) displayFearStat = checkTabList(" §r§5Fear: ") |