aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/slayer
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/hannibal2/skyhanni/features/slayer
parent7fa0575aa4226e2662580255541c702626ea0c36 (diff)
downloadskyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.tar.gz
skyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.tar.bz2
skyhanni-d82e073b6b2705213cc18dd19ee20806881bb4cf.zip
wrong blaze dagger chat
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt14
1 files changed, 14 insertions, 0 deletions
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