diff --git a/CHANGELOG.md b/CHANGELOG.md index 1057e56e9780..3cf748d79dd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,11 @@ + Added Sea Creature Tracker. - hannibal2 + Allows to only show single variants, e.g. water or lava or winter. +#### Mining Features + ++ Added Deep Caverns Parkour. - hannibal2 + + Shows a parkour to the bottom of Deep Caverns and to Rhys. + #### Dungeon Features + Hide particles and damage splashes during the terracotta phase in dungeons F6 and M6. - hannibal2 @@ -140,6 +145,7 @@ #### Diana Changes + Changed the Griffin Burrow Guess text to a centered title instead of an odd line that goes down. - hannibal2 ++ Removed unnecessary error messages in Diana Burrow detection. - hannibal2 #### Chat Changes @@ -181,6 +187,8 @@ + Fixed rarity error for items thrown around when using Sprayanator. - hannibal2 + Added cooldown to Garden Warp Commands. - Empa + Fixed the detection of Anita and Jacob visitors. - hannibal2 ++ Fixed the pets menu detection for /ff. - martimavocado ++ Fixed Anita and Jacob workaround working outside of garden. - CalMWolfs #### Combat Fixes @@ -220,6 +228,7 @@ + Fixed Mining Chat Filter not hiding gemstone messages. - CalMWolfs + Fixed names for the Crystal Hollows Mining Areas feature. - alexia + Fixed detection of gold and diamond essence gain chat message when powder mining. - CalMWolfs ++ Fixed powder mining start/end detection in Powder Tracker. - CalMWolfs #### Rift Fixes @@ -240,6 +249,8 @@ + Fixed rune price calculation in Chest Value. - hannibal2 + Fixed Power Stone Guide Highlight shows in other inventories when exiting via command. - hannibal2 + Added options to hide Helmet Skins, Armor Dyes or Runes from Estimated Item Value Calculation. - hannibal2 ++ Fixed Divine Gift and Flash enchants showing the wrong/no price in EstimatedItemValue. - jani ++ Fixed showing the Piece of Wizard Portal earned duplicate. - Thunderblade73 #### Bingo Fixes @@ -275,6 +286,7 @@ + Fixed NPC typos in config. - absterge + Fixed rare error in Harp Features. - Thunderblade73 + Fixed some getItemStack errors. - CalMWolfs ++ Fixed Minion XP calculation not working when having different mouse settings. - Thunderblade73 ### Technical Changes @@ -326,6 +338,12 @@ + Using NEUInternalName in the Reputation Helper Quest. - CalMWolfs + Limit RAM to 4 GB in the developement enviroment. - CalMWolfs + This is just the default and can be changed if needed. ++ Made /shupdaterepo better. - CalMWolfs ++ Added alignment support to Renderable. - Thunderblade73 ++ Added support for dynamic Y size in Renderables. - Thunderblade73 ++ Added outgoing chat log to /shchathistory. - nea ++ Added sending mining events to Soopy's API to test for new Mining Event feature. - CalMWolfs ++ Added /shcopybossbar to copy bossbar - Erymanthus ## Version 0.22 diff --git a/FEATURES.md b/FEATURES.md index c96ecc51e8a6..63b4ccd31d1b 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -688,6 +688,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game. + Fully customizable: change what items or stats to show. + Has support for the maxed Great Explorer perk. + Option to hide while not grinding powder. ++ Added Deep Caverns Parkour. - hannibal2 + + Shows a parkour to the bottom of Deep Caverns and to Rhys.
diff --git a/build.gradle.kts b/build.gradle.kts index 484c6fe556da..fa6b47df088b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,7 +14,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.23.Beta.16" +version = "0.23.Beta.17" val gitHash by lazy { val baos = ByteArrayOutputStream() diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index f67d38661e10..0640f3a8b9e6 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -9,6 +9,7 @@ import at.hannibal2.skyhanni.config.SackData import at.hannibal2.skyhanni.config.commands.Commands.init import at.hannibal2.skyhanni.data.ActionBarStatsData import at.hannibal2.skyhanni.data.BlockData +import at.hannibal2.skyhanni.data.BossbarData import at.hannibal2.skyhanni.data.ChatManager import at.hannibal2.skyhanni.data.CropAccessoryData import at.hannibal2.skyhanni.data.EntityData @@ -229,6 +230,7 @@ import at.hannibal2.skyhanni.features.mining.DeepCavernsParkour import at.hannibal2.skyhanni.features.mining.HighlightMiningCommissionMobs import at.hannibal2.skyhanni.features.mining.KingTalismanHelper import at.hannibal2.skyhanni.features.mining.crystalhollows.CrystalHollowsNamesInCore +import at.hannibal2.skyhanni.features.mining.eventtracker.MiningEventTracker import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker import at.hannibal2.skyhanni.features.minion.MinionCollectLogic import at.hannibal2.skyhanni.features.minion.MinionFeatures @@ -381,7 +383,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.23.Beta.16", + version = "0.23.Beta.17", ) class SkyHanniMod { @@ -444,6 +446,7 @@ class SkyHanniMod { loadModule(TrackerManager) loadModule(UtilsPatterns) loadModule(PetAPI) + loadModule(BossbarData) // APIs loadModule(BazaarApi()) @@ -727,6 +730,7 @@ class SkyHanniMod { loadModule(SprayDisplay()) loadModule(HighlightPlaceableNpcs()) loadModule(PresentWaypoints()) + loadModule(MiningEventTracker()) loadModule(JyrreTimer()) loadModule(NewYearCakeReminder()) loadModule(SulphurSkitterBox()) diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index a2820fbfc525..69b096b3130a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -55,6 +55,7 @@ import at.hannibal2.skyhanni.test.SkyHanniConfigSearchResetCommand import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.test.TestBingo import at.hannibal2.skyhanni.test.WorldEdit +import at.hannibal2.skyhanni.test.command.CopyBossbarCommand import at.hannibal2.skyhanni.test.command.CopyItemCommand import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand import at.hannibal2.skyhanni.test.command.CopyNearbyParticlesCommand @@ -355,6 +356,10 @@ object Commands { "shcopyscoreboard", "Copies the scoreboard data to the clipboard" ) { CopyScoreboardCommand.command(it) } + registerCommand( + "shcopybossbar", + "Copies the name of the bossbar to the clipboard, including formatting codes" + ) { CopyBossbarCommand.command(it) } registerCommand( "shcopyitem", "Copies information about the item in hand to the clipboard" diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java index 462908f6e8cd..9b385494bb08 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java @@ -3,11 +3,16 @@ import at.hannibal2.skyhanni.config.FeatureToggle; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.Accordion; +import io.github.moulberry.moulconfig.annotations.Category; import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; import io.github.moulberry.moulconfig.annotations.ConfigOption; public class MiningConfig { + @Expose + @Category(name = "Mining Event Tracker", desc = "Settings for the Mining Event Tracker") + public MiningEventConfig miningEvent = new MiningEventConfig(); + @Expose @ConfigOption(name = "Powder Tracker", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java new file mode 100644 index 000000000000..261283c7bea4 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningEventConfig.java @@ -0,0 +1,61 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigOption; + +public class MiningEventConfig { + +// @Expose +// @ConfigOption(name = "Enabled", desc = "Show information about upcoming Dwarven Mines and Crystal Hollows mining events, also enables you sending data.") +// @ConfigEditorBoolean +// @FeatureToggle +// public boolean enabled = true; +// +// @Expose +// @ConfigOption(name = "Show Outside Mining Islands", desc = "Shows the event tracker when you are not inside of the Dwarven Mines or Crystal Hollows.") +// @ConfigEditorBoolean +// public boolean outsideMining = true; +// +// @Expose +// @ConfigOption(name = "What to Show", desc = "Choose which island's events are shown in the gui.") +// @ConfigEditorDropdown +// public ShowType showType = ShowType.BOTH; +// +// @Expose +// @ConfigOption(name = "Show Warnings For Events", desc = "Shows the warnings when select mining events are about to start.") +// @ConfigEditorBoolean +// @FeatureToggle +// public boolean showWarnings = false; + + //todo remove when released + @Expose + @ConfigOption(name = "Send Test data", desc = "Sends test data to make sure the api works.") + @ConfigEditorBoolean + @FeatureToggle + public boolean sendData = true; + +// @Expose +// @ConfigOption(name = "Events to Warn for", desc = "Choose which mining events you get warned about.") +// @ConfigEditorDraggableList +// public List eventsToWarn = new ArrayList<>(Collections.singletonList(MiningEvent.DOUBLE_POWDER)); + + public enum ShowType { + BOTH("Both Mining Islands"), + CRYSTAL("Crystal Hollows Only"), + DWARVEN("Dwarven Mines Only") + ; + + private final String str; + + ShowType(String str) { + this.str = str; + } + + @Override + public String toString() { + return str; + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt new file mode 100644 index 000000000000..75ad8df9bc51 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt @@ -0,0 +1,33 @@ +package at.hannibal2.skyhanni.data + +import at.hannibal2.skyhanni.events.BossbarUpdateEvent +import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import net.minecraft.entity.boss.BossStatus +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +object BossbarData { + private var bossbar: String? = null + private var previousServerBossbar = "" + + fun getBossbar() = bossbar ?: "" + + @SubscribeEvent + fun onWorldChange(event: LorenzWorldChangeEvent) { + val oldBossbar = bossbar ?: return + previousServerBossbar = oldBossbar + bossbar = null + } + + @SubscribeEvent + fun onTick(event: LorenzTickEvent) { + val bossbarLine = BossStatus.bossName ?: return + if (bossbarLine.isBlank() || bossbarLine.isEmpty()) return + if (bossbarLine == bossbar) return + if (bossbarLine == previousServerBossbar) return + if (previousServerBossbar.isNotEmpty()) previousServerBossbar = "" + + bossbar = bossbarLine + BossbarUpdateEvent(bossbarLine).postAndCatch() + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index 34e4354dda34..08bef76ff387 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -17,6 +17,7 @@ import net.minecraft.client.gui.GuiNewChat import net.minecraft.event.HoverEvent import net.minecraft.network.play.client.C01PacketChatMessage import net.minecraft.network.play.server.S02PacketChat +import net.minecraft.util.ChatComponentText import net.minecraft.util.EnumChatFormatting import net.minecraft.util.IChatComponent import net.minecraftforge.client.event.ClientChatReceivedEvent @@ -46,6 +47,8 @@ object ChatManager { RETRACTED(EnumChatFormatting.DARK_PURPLE.toString() + EnumChatFormatting.BOLD), MODIFIED(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD), ALLOWED(EnumChatFormatting.GREEN), + OUTGOING(EnumChatFormatting.BLUE), + OUTGOING_BLOCKED(EnumChatFormatting.BLUE.toString() + EnumChatFormatting.BOLD), ; val renderedString = "$format$name" @@ -82,7 +85,14 @@ object ChatManager { val packet = event.packet as? C01PacketChatMessage ?: return val message = packet.message - event.isCanceled = MessageSendToServerEvent(message).postAndCatch() + val component = ChatComponentText(message) + messageHistory[IdentityCharacteristics(component)] = + MessageFilteringResult(component, ActionKind.OUTGOING, null, null) + if (MessageSendToServerEvent(message).postAndCatch()) { + event.isCanceled = true + messageHistory[IdentityCharacteristics(component)] = + MessageFilteringResult(component, ActionKind.OUTGOING_BLOCKED, null, null) + } } @SubscribeEvent(receiveCanceled = true) diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 78017b7bcc76..3f6ec7051739 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -26,20 +26,40 @@ import net.minecraftforge.fml.common.network.FMLNetworkEvent import kotlin.concurrent.thread class HypixelData { - private val group = RepoPattern.group("data.hypixeldata") - private val tabListProfilePattern by group.pattern("tablistprofile", "§e§lProfile: §r§a(?.*)") - private val lobbyTypePattern by group.pattern("lobbytype", "(?.*lobby)\\d+") - private val islandNamePattern by group.pattern("islandname", "(?:§.)*(Area|Dungeon): (?:§.)*(?.*)") + private val patternGroup = RepoPattern.group("data.hypixeldata") + private val tabListProfilePattern by patternGroup.pattern( + "tablistprofile", + "§e§lProfile: §r§a(?.*)" + ) + private val lobbyTypePattern by patternGroup.pattern( + "lobbytype", + "(?.*lobby)\\d+" + ) + private val islandNamePattern by patternGroup.pattern( + "islandname", + "(?:§.)*(Area|Dungeon): (?:§.)*(?.*)" + ) private var lastLocRaw = 0L companion object { + private val patternGroup = RepoPattern.group("data.hypixeldata") + private val serverIdScoreboardPattern by patternGroup.pattern( + "serverid.scoreboard", + "§7\\d+/\\d+/\\d+ §8(?[mM])(?\\S+)" + ) + private val serverIdTablistPattern by patternGroup.pattern( + "serverid.tablist", + " Server: §r§8(?\\S+)" + ) + var hypixelLive = false var hypixelAlpha = false var inLobby = false var inLimbo = false var skyBlock = false var skyBlockIsland = IslandType.UNKNOWN + var serverId: String? = null //Ironman, Stranded and Bingo var noTrade = false @@ -70,6 +90,24 @@ class HypixelData { val lobbyType get() = locraw["lobbytype"] ?: "" val mode get() = locraw["mode"] ?: "" val map get() = locraw["map"] ?: "" + + fun getCurrentServerId(): String? { + if (!LorenzUtils.inSkyBlock) return null + if (serverId != null) return serverId + + ScoreboardData.sidebarLinesFormatted.forEach { serverIdScoreboardPattern.matchMatcher(it) { + val serverType = if (group("servertype") == "M") "mega" else "mini" + serverId = "$serverType${group("serverid")}" + return serverId + } } + + TabListData.getTabList().forEach { serverIdTablistPattern.matchMatcher(it) { + serverId = group("serverid") + return serverId + } } + + return serverId + } } private var loggerIslandChange = LorenzLogger("debug/island_change") @@ -82,6 +120,7 @@ class HypixelData { inLobby = false locraw.forEach { locraw[it.key] = "" } joinedWorld = System.currentTimeMillis() + serverId = null } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index 5296053d1f2a..b686602bb3d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SimpleTimeMark import com.google.gson.JsonObject import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -22,12 +23,14 @@ import java.net.URL import java.nio.charset.StandardCharsets import java.util.concurrent.CompletableFuture import java.util.concurrent.atomic.AtomicBoolean +import kotlin.time.Duration.Companion.minutes class RepoManager(private val configLocation: File) { private val gson get() = ConfigManager.gson private var latestRepoCommit: String? = null private val repoLocation: File = File(configLocation, "repo") private var error = false + private var lastRepoUpdate = SimpleTimeMark.farPast() companion object { val successfulConstants = mutableListOf() @@ -82,8 +85,7 @@ class RepoManager(private val configLocation: File) { val file = File(configLocation, "repo") if (file.exists() && currentCommitJSON != null && currentCommitJSON["sha"].asString == latestRepoCommit ) { - if (unsuccessfulConstants.isEmpty()) { - + if (unsuccessfulConstants.isEmpty() && lastRepoUpdate.passedSince() < 1.minutes) { if (command) { LorenzUtils.chat("§7The repo is already up to date!") atomicShouldManuallyReload.set(false) @@ -91,6 +93,7 @@ class RepoManager(private val configLocation: File) { return@supplyAsync false } } + lastRepoUpdate = SimpleTimeMark.now() RepoUtils.recursiveDelete(repoLocation) repoLocation.mkdirs() val itemsZip = File(repoLocation, "sh-repo-main.zip") @@ -214,19 +217,20 @@ class RepoManager(private val configLocation: File) { return } if (unsuccessfulConstants.isEmpty() && successfulConstants.isNotEmpty()) { - LorenzUtils.chat("Repo working fine!", prefixColor = "§a") + LorenzUtils.chat("Repo working fine! Commit hash: $latestRepoCommit", prefixColor = "§a") return } + LorenzUtils.chat("Repo has errors! Commit has: ${latestRepoCommit ?: "null"}", prefixColor = "§c") if (successfulConstants.isNotEmpty()) LorenzUtils.chat( "Successful Constants §7(${successfulConstants.size}):", prefixColor = "§a" ) for (constant in successfulConstants) { - LorenzUtils.chat(" §a- §7$constant") + LorenzUtils.chat(" §a- §7$constant", false) } LorenzUtils.chat("Unsuccessful Constants §7(${unsuccessfulConstants.size}):") for (constant in unsuccessfulConstants) { - LorenzUtils.chat(" §e- §7$constant") + LorenzUtils.chat(" §e- §7$constant", false) } } diff --git a/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt new file mode 100644 index 000000000000..7dd0d10bbf31 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt @@ -0,0 +1,3 @@ +package at.hannibal2.skyhanni.events + +class BossbarUpdateEvent(val bossbar: String) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEvent.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEvent.kt new file mode 100644 index 000000000000..f5d8e26d8066 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEvent.kt @@ -0,0 +1,26 @@ +package at.hannibal2.skyhanni.features.mining.eventtracker + +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import kotlin.time.Duration +import kotlin.time.Duration.Companion.minutes +import kotlin.time.Duration.Companion.seconds + +enum class MiningEvent(val eventName: String, val defaultLength: Duration, private val colourCode: Char) { + GONE_WITH_THE_WIND("GONE WITH THE WIND", 18.minutes, '9'), + DOUBLE_POWDER("2X POWDER", 15.minutes, 'b'), + GOBLIN_RAID("GOBLIN RAID", 5.minutes, 'c'), + BETTER_TOGETHER("BETTER TOGETHER", 18.minutes, 'd'), + RAFFLE("RAFFLE", 160.seconds, '6'), + MITHRIL_GOURMAND("MITHRIL GOURMAND", 10.minutes, 'b'), + ; + + override fun toString(): String { + return "§$colourCode$eventName" + } + + companion object { + fun fromBossbarName(bossbarName: String): MiningEvent? { + return MiningEvent.entries.find { it.eventName == bossbarName.removeColor() } + } + } +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventData.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventData.kt new file mode 100644 index 000000000000..ee2033ed444e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventData.kt @@ -0,0 +1,13 @@ +package at.hannibal2.skyhanni.features.mining.eventtracker + +import at.hannibal2.skyhanni.data.IslandType +import com.google.gson.annotations.Expose +import com.google.gson.annotations.SerializedName + +data class MiningEventData( + @Expose @SerializedName("server_type") val serverType: IslandType, + @Expose @SerializedName("server_id") val serverId: String, + @Expose val event: MiningEvent, + @Expose @SerializedName("time_left") val timeRemaining: Long, + @Expose @SerializedName("reporter_uuid") val uuid: String +) 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 new file mode 100644 index 000000000000..1fef5b2ee544 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt @@ -0,0 +1,156 @@ +package at.hannibal2.skyhanni.features.mining.eventtracker + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigManager +import at.hannibal2.skyhanni.data.BossbarData +import at.hannibal2.skyhanni.data.HypixelData +import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.data.ScoreboardData +import at.hannibal2.skyhanni.events.BossbarUpdateEvent +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.test.command.ErrorManager +import at.hannibal2.skyhanni.utils.APIUtil +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland +import at.hannibal2.skyhanni.utils.SimpleTimeMark +import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import at.hannibal2.skyhanni.utils.TabListData +import at.hannibal2.skyhanni.utils.TimeUtils +import at.hannibal2.skyhanni.utils.getBoolean +import at.hannibal2.skyhanni.utils.getStringOrValue +import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern +import kotlinx.coroutines.launch +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import kotlin.time.Duration.Companion.seconds + +class MiningEventTracker { + private val config get() = SkyHanniMod.feature.mining.miningEvent + + private val patternGroup = RepoPattern.group("mining.eventtracker") + private val bossbarPassivePattern by patternGroup.pattern( + "bossbar.passive", + "§e§lPASSIVE EVENT (?.+) §e§lRUNNING FOR §a§l(?