From 28745d981c1ed2008d4ebb71b0b69ba217c1770d Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 12:42:20 +0200 Subject: RNG Meter Display --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index f36cc9d63..0021299fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -42,7 +42,6 @@ import at.hannibal2.skyhanni.features.minion.MinionCollectLogic import at.hannibal2.skyhanni.features.minion.MinionFeatures import at.hannibal2.skyhanni.features.misc.* import at.hannibal2.skyhanni.features.misc.discordrpc.DiscordRPCManager -import at.hannibal2.skyhanni.features.misc.GhostCounter import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue import at.hannibal2.skyhanni.features.misc.items.EstimatedWardrobePrice import at.hannibal2.skyhanni.features.misc.tabcomplete.PlayerTabComplete @@ -297,6 +296,7 @@ class SkyHanniMod { loadModule(RestorePieceOfWizardPortalLore()) loadModule(QuickModMenuSwitch) loadModule(ShowItemUuid()) + loadModule(SlayerRngMeterDisplay()) loadModule(GhostCounter) init() -- cgit From 4c9b2f977bda0aef5a7e714553d534b60b1ce308 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 12:44:25 +0200 Subject: Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary --- CHANGELOG.md | 1 + FEATURES.md | 1 + src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 + .../hannibal2/skyhanni/config/features/Chat.java | 7 ++- .../features/chat/ArachneChatMessageHider.kt | 50 ++++++++++++++++++++++ 5 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/CHANGELOG.md b/CHANGELOG.md index 89b6f554e..b2fd4438b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ + Default disabled + Detects your SkyBlock Mod automatically + Does detect Chat Triggers and OneConfig itself, but no single mods that require these libraries ++ Added **Arachne Chat Hider** - Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary ### Changes + Added Options for displays Crop Milestone and Best Crop Time. diff --git a/FEATURES.md b/FEATURES.md index b6568d9bd..2089efb3f 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -20,6 +20,7 @@ - Scan messages sent by players in all-chat for blacklisted words and greys out the message. - Chat peeking (holding key to display chat without opening the chat gui) - Compact Potion Effect Messages +- **Arachne Chat Hider** - Hide chat messages about the Arachne Fight while outside of Arachne's Sanctuary ## Dungeon - Clicked Blocks (Showing the block behind walls AFTER clicked on a chest, wither essence or a lever) diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 0021299fa..ebe7d2686 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -12,6 +12,7 @@ import at.hannibal2.skyhanni.features.bazaar.BazaarBestSellMethod import at.hannibal2.skyhanni.features.bazaar.BazaarCancelledBuyOrderClipboard import at.hannibal2.skyhanni.features.bazaar.BazaarOrderHelper import at.hannibal2.skyhanni.features.bingo.* +import at.hannibal2.skyhanni.features.chat.ArachneChatMessageHider import at.hannibal2.skyhanni.features.chat.ChatFilter import at.hannibal2.skyhanni.features.chat.PlayerDeathMessages import at.hannibal2.skyhanni.features.chat.playerchat.PlayerChatFilter @@ -295,6 +296,7 @@ class SkyHanniMod { loadModule(DetectBrokenHyperion()) loadModule(RestorePieceOfWizardPortalLore()) loadModule(QuickModMenuSwitch) + loadModule(ArachneChatMessageHider()) loadModule(ShowItemUuid()) loadModule(SlayerRngMeterDisplay()) loadModule(GhostCounter) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java index bd60e0eee..f149fc624 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Chat.java @@ -122,10 +122,15 @@ public class Chat { "except for players who are nearby or during dungeons/a Kuudra fight.") @ConfigEditorBoolean public boolean hideFarDeathMessages = false; - //TODO jawbus + x + //TODO jawbus + thunder @Expose @ConfigOption(name = "Compact Potion Message", desc = "Shorten chat messages about player potion effects.") @ConfigEditorBoolean public boolean compactPotionMessage = true; + + @Expose + @ConfigOption(name = "Arachne Hider", desc = "Hide chat messages about the Arachne Fight while outside of §eArachne's Sanctuary§7.") + @ConfigEditorBoolean + public boolean hideArachneMessages = false; } diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt new file mode 100644 index 000000000..d870197c7 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt @@ -0,0 +1,50 @@ +package at.hannibal2.skyhanni.features.chat + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class ArachneChatMessageHider { + private val config get() = SkyHanniMod.feature.chat + private var hideArachneDeadMessage = false + private val arachneCallingPattern = "§4☄ §r.* §r§eplaced an §r§9Arachne's Calling§r§e!.*".toPattern() + private val arachneCrystalPattern = "§4☄ §r.* §r§eplaced an Arachne Crystal! Something is awakening!".toPattern() + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + if (!isEnabled()) return + if (LorenzUtils.skyBlockIsland != IslandType.SPIDER_DEN) return + if (LorenzUtils.skyBlockArea == "Arachne's Sanctuary") return + + if (shouldHide(event.message)) { + event.blockedReason = "arachne" + } + } + + private fun shouldHide(message: String): Boolean { + + arachneCallingPattern.matchMatcher(message) { + return true + } + arachneCrystalPattern.matchMatcher(message) { + return true + } + + if (message == "§c[BOSS] Arachne§r§f: Ahhhh...A Calling...") return true + if (message == "§c[BOSS] Arachne§r§f: The Era of Spiders begins now.") return true + + if (message == "§a§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬") { + hideArachneDeadMessage = !hideArachneDeadMessage + return true + } + if (message == " §r§6§lARACHNE DOWN!") { + hideArachneDeadMessage = true + } + return hideArachneDeadMessage + } + + fun isEnabled() = LorenzUtils.inSkyBlock && config.hideArachneMessages +} -- cgit From 8d410f3a4e4693da3c42fec910f543083bb57eb5 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 19 Jun 2023 13:15:04 +0200 Subject: Beta 21 --- build.gradle.kts | 2 +- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt') diff --git a/build.gradle.kts b/build.gradle.kts index 776a462f8..36ac1ea6f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "at.hannibal2.skyhanni" -version = "0.18.Beta.20" +version = "0.18.Beta.21" // Toolchains: java { diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index ebe7d2686..51d695899 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -94,7 +94,7 @@ import org.apache.logging.log4j.Logger clientSideOnly = true, useMetadata = true, guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop", - version = "0.18.Beta.20", + version = "0.18.Beta.21", ) class SkyHanniMod { @Mod.EventHandler -- cgit