diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-04-10 17:18:35 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 09:18:35 +0200 |
commit | fc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d (patch) | |
tree | 034630ba350c42a5cfd582a2cfdc88bb15fb68cc /src/main/java/at/hannibal2/skyhanni/features/slayer | |
parent | 3397cc4474e3165865707182a5dcacf5bb4e68bd (diff) | |
download | skyhanni-fc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d.tar.gz skyhanni-fc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d.tar.bz2 skyhanni-fc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d.zip |
Backend: Remove some more deprecated functions and misc code cleanup (#1402)
Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt | 35 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt | 5 |
2 files changed, 19 insertions, 21 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt index a4555eaf3..7724c7e22 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerClearView.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.slayer.blaze import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.features.combat.damageindicator.BossType import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.utils.LorenzUtils @@ -16,24 +16,23 @@ class BlazeSlayerClearView { private var nearBlaze = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!LorenzUtils.inSkyBlock) return - if (event.repeatSeconds(3)) { - nearBlaze = DamageIndicatorManager.getDistanceTo( - BossType.SLAYER_BLAZE_1, - BossType.SLAYER_BLAZE_2, - BossType.SLAYER_BLAZE_3, - BossType.SLAYER_BLAZE_4, - BossType.SLAYER_BLAZE_TYPHOEUS_1, - BossType.SLAYER_BLAZE_TYPHOEUS_2, - BossType.SLAYER_BLAZE_TYPHOEUS_3, - BossType.SLAYER_BLAZE_TYPHOEUS_4, - BossType.SLAYER_BLAZE_QUAZII_1, - BossType.SLAYER_BLAZE_QUAZII_2, - BossType.SLAYER_BLAZE_QUAZII_3, - BossType.SLAYER_BLAZE_QUAZII_4, - ) < 10 - } + if (!event.repeatSeconds(3)) return + nearBlaze = DamageIndicatorManager.getDistanceTo( + BossType.SLAYER_BLAZE_1, + BossType.SLAYER_BLAZE_2, + BossType.SLAYER_BLAZE_3, + BossType.SLAYER_BLAZE_4, + BossType.SLAYER_BLAZE_TYPHOEUS_1, + BossType.SLAYER_BLAZE_TYPHOEUS_2, + BossType.SLAYER_BLAZE_TYPHOEUS_3, + BossType.SLAYER_BLAZE_TYPHOEUS_4, + BossType.SLAYER_BLAZE_QUAZII_1, + BossType.SLAYER_BLAZE_QUAZII_2, + BossType.SLAYER_BLAZE_QUAZII_3, + BossType.SLAYER_BLAZE_QUAZII_4, + ) < 10 } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index fb6b57bab..a3359202c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled @@ -161,9 +161,8 @@ class EndermanSlayerFeatures { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!IslandType.THE_END.isInIsland()) return - if (!event.repeatSeconds(1)) return nukekubiSkulls.removeAll { if (it.isDead) { |