From 59cf5c886b055c946cf649d0c703ed5a647c763d Mon Sep 17 00:00:00 2001 From: HiZe Date: Fri, 26 Jul 2024 10:33:59 +0200 Subject: Fix: Double Powder Detection (#2157) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../features/mining/powdertracker/PowderTracker.kt | 52 ++++++++++++++++++---- 1 file changed, 43 insertions(+), 9 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index d283c4f2d..69e93489f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.mining.PowderTrackerConfig.PowderDisplayEntry import at.hannibal2.skyhanni.data.BossbarData import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent @@ -21,6 +22,7 @@ import at.hannibal2.skyhanni.utils.NumberUtil.formatLong import at.hannibal2.skyhanni.utils.RegexUtils.groupOrNull import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker import at.hannibal2.skyhanni.utils.tracker.TrackerData @@ -28,6 +30,7 @@ import com.google.gson.JsonArray import com.google.gson.JsonNull import com.google.gson.annotations.Expose import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration import kotlin.time.Duration.Companion.minutes @SkyHanniModule @@ -53,6 +56,14 @@ object PowderTracker { "§e§lPASSIVE EVENT §b§l2X POWDER §e§lRUNNING FOR §a§l(?