summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/mining
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2024-04-10 17:18:35 +1000
committerGitHub <noreply@github.com>2024-04-10 09:18:35 +0200
commitfc8d82ca5e95d13bcd2205406f1ddcf9e525eb6d (patch)
tree034630ba350c42a5cfd582a2cfdc88bb15fb68cc /src/main/java/at/hannibal2/skyhanni/features/mining
parent3397cc4474e3165865707182a5dcacf5bb4e68bd (diff)
downloadskyhanni-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/mining')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
index ca92ddb2b..1643c460a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
@@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent
-import at.hannibal2.skyhanni.events.LorenzTickEvent
+import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.CollectionUtils.sorted
import at.hannibal2.skyhanni.utils.CollectionUtils.sortedDesc
@@ -70,8 +70,7 @@ class KingTalismanHelper {
kingLocation.distanceToPlayer() < 10
@SubscribeEvent
- fun onTick(event: LorenzTickEvent) {
- if (!event.repeatSeconds(1)) return
+ fun onSecondPassed(event: SecondPassedEvent) {
if (!isEnabled()) return
val storage = storage ?: return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt
index 9d0ce3c33..251466cc9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt
@@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.data.HypixelData
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.BossbarUpdateEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
-import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
+import at.hannibal2.skyhanni.events.SecondPassedEvent
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.APIUtil
import at.hannibal2.skyhanni.utils.LorenzUtils
@@ -89,8 +89,7 @@ class MiningEventTracker {
}
@SubscribeEvent
- fun onTick(event: LorenzTickEvent) {
- if (!event.repeatSeconds(1)) return
+ fun onSecondPassed(event: SecondPassedEvent) {
if (!config.enabled) return
if (!LorenzUtils.inSkyBlock || (!config.outsideMining && !LorenzUtils.inAdvancedMiningIsland())) return
if (!canRequestAt.isInPast()) return