aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 18:29:53 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 18:29:53 +0200
commitd82e073b6b2705213cc18dd19ee20806881bb4cf (patch)
treecfc4e6307030910f4e205c0771a5c31408256af7 /src/main/java/at
parent7fa0575aa4226e2662580255541c702626ea0c36 (diff)
downloadskyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.tar.gz
skyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.tar.bz2
skyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.zip
wrong blaze dagger chat
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt8
3 files changed, 21 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
index 544493750..def86bc74 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
@@ -59,6 +59,12 @@ public class Slayer {
public int blazeFirstDagger = 0;
@Expose
+ @ConfigOption(name = "Hide Chat", desc = "Remove the wrong dagger messages from chat.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 2)
+ public boolean blazeHideDaggerWarning = false;
+
+ @Expose
@ConfigOption(name = "Fire Pillars", desc = "")
@ConfigEditorAccordion(id = 3)
@ConfigAccordionId(id = 1)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
index be8871bd5..551fe6177 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt
@@ -3,11 +3,13 @@ package at.hannibal2.skyhanni.features.slayer.blaze
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.core.util.render.TextRenderUtils
import at.hannibal2.skyhanni.events.ItemClickInHandEvent
+import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.name
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.matchRegex
import at.hannibal2.skyhanni.utils.NumberUtil.roundToPrecision
import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.client.Minecraft
@@ -33,6 +35,18 @@ class BlazeSlayerDaggerHelper {
private var lastNearest: HellionShield? = null
@SubscribeEvent
+ fun onChatMessage(event: LorenzChatEvent) {
+ if (!LorenzUtils.inSkyblock) return
+ if (!SkyHanniMod.feature.slayer.blazeHideDaggerWarning) return
+
+ val message = event.message
+ if (message.matchRegex("§cStrike using the §r(.+) §r§cattunement on your dagger!") ||
+ message == "§cYour hit was reduced by Hellion Shield!") {
+ event.blockedReason = "blaze_slayer_dagger"
+ }
+ }
+
+ @SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (!isEnabled()) return
diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
index 87473af62..feefb60d7 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
@@ -110,13 +110,7 @@ class LorenzTest {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
-// val message = event.message
-// if (message.matchRegex("§cStrike using the §r(.+) §r§cattunement on your dagger!")) {
-// event.blockedReason = "lorenz_test"
-// }
-// if (message == "§cYour hit was reduced by Hellion Shield!") {
-// event.blockedReason = "lorenz_test"
-// }
+
}
@SubscribeEvent