From fc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:18:35 +1000 Subject: 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> --- .../skyhanni/features/fishing/TotemOfCorruption.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing') diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt index 54e5d6c30..b6da38ccd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.fishing.TotemOfCorruptionConfig.OutlineType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer @@ -35,16 +35,16 @@ class TotemOfCorruption { private var display = emptyList() private var totems: List = emptyList() - private val group = RepoPattern.group("fishing.totemofcorruption") - private val totemNamePattern by group.pattern( + private val patternGroup = RepoPattern.group("fishing.totemofcorruption") + private val totemNamePattern by patternGroup.pattern( "totemname", "§5§lTotem of Corruption" ) - private val timeRemainingPattern by group.pattern( + private val timeRemainingPattern by patternGroup.pattern( "timeremaining", "§7Remaining: §e(?:(?\\d+)m )?(?\\d+)s" ) - private val ownerPattern by group.pattern( + private val ownerPattern by patternGroup.pattern( "owner", "§7Owner: §e(?.+)" ) @@ -56,7 +56,7 @@ class TotemOfCorruption { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onSecondPassed(event: SecondPassedEvent) { if (!event.repeatSeconds(2)) return if (!isOverlayEnabled()) return @@ -148,7 +148,7 @@ class TotemOfCorruption { private fun isEffectiveAreaEnabled() = LorenzUtils.inSkyBlock && config.outlineType != OutlineType.NONE } -class Totem( +private class Totem( val location: LorenzVec, val timeRemaining: Duration, val ownerName: String, -- cgit