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/fishing | |
| 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/fishing')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt | 14 |
1 files changed, 7 insertions, 7 deletions
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<String>() private var totems: List<Totem> = 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(?:(?<min>\\d+)m )?(?<sec>\\d+)s" ) - private val ownerPattern by group.pattern( + private val ownerPattern by patternGroup.pattern( "owner", "§7Owner: §e(?<owner>.+)" ) @@ -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, |
