aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-08 18:55:05 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-08 18:55:05 +0200
commit075621619ab3b1b29f5f1d0f2eb3fdbd50fab9a7 (patch)
tree8c54348500dd8a27dcec5118ef7b1ecc22fbf674 /src/main/java/at/hannibal2/skyhanni/features
parentbe73b8573a54c0b3fecd62af3b1e2d7fda4a068a (diff)
downloadSkyHanni-075621619ab3b1b29f5f1d0f2eb3fdbd50fab9a7.tar.gz
SkyHanni-075621619ab3b1b29f5f1d0f2eb3fdbd50fab9a7.tar.bz2
SkyHanni-075621619ab3b1b29f5f1d0f2eb3fdbd50fab9a7.zip
bigger blaze slayer warning text, hide event exp message, fixed wrong blaze slayer dagger display
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt9
3 files changed, 11 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
index 505e1dee6..7421bd10a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
@@ -279,8 +279,8 @@ class ChatFilter {
private fun guild(message: String): Boolean = when {
message.matchRegex("§2Guild > (.*) §r§e(joined|left).") -> true
- message.matchRegex("§aYou earned §r§2(.*) GEXP §r§afrom playing SkyBlock!") -> true
- message.matchRegex("§aYou earned §r§2(.*) GEXP §r§a\\+ §r§e(.*) Event EXP §r§afrom playing SkyBlock!") -> true
+ message.matchRegex("§aYou earned §r§2\\d+ GEXP §r§afrom playing SkyBlock!") -> true
+ message.matchRegex("§aYou earned §r§2(\\d|,)+ GEXP §r§a\\+ §r§[e5](\\d|,)+ Event EXP §r§afrom playing SkyBlock!") -> true
message == "§b§m-----------------------------------------------------" -> true
else -> false
}
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 551fe6177..793764000 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
@@ -41,7 +41,8 @@ class BlazeSlayerDaggerHelper {
val message = event.message
if (message.matchRegex("§cStrike using the §r(.+) §r§cattunement on your dagger!") ||
- message == "§cYour hit was reduced by Hellion Shield!") {
+ message == "§cYour hit was reduced by Hellion Shield!"
+ ) {
event.blockedReason = "blaze_slayer_dagger"
}
}
@@ -82,10 +83,9 @@ class BlazeSlayerDaggerHelper {
if (lastNearestCheck + 100 > System.currentTimeMillis()) return lastNearest
lastNearestCheck = System.currentTimeMillis()
-
val playerLocation = LocationUtils.playerLocation()
return HellionShieldHelper.hellionShieldMobs
- .filter { it.key.getLorenzVec().distance(playerLocation) < 10 && it.key.health > 0 }
+ .filter { !it.key.isDead && it.key.getLorenzVec().distance(playerLocation) < 10 && it.key.health > 0 }
.toSortedMap { a, b ->
if (a.getLorenzVec().distance(playerLocation) > b.getLorenzVec().distance(playerLocation)) 1 else 0
}.firstNotNullOfOrNull { it.value }
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt
index 5f2221b8c..214e25eb7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerPillar.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.slayer.blaze
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.data.SendTitleHelper
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.features.damageindicator.BossType
@@ -9,7 +10,6 @@ import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.matchRegex
-import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.SoundUtils
import at.hannibal2.skyhanni.utils.SoundUtils.playSound
import at.hannibal2.skyhanni.utils.getLorenzVec
@@ -84,6 +84,7 @@ class BlazeSlayerPillar {
if (matcher.matches()) {
lastPillarSpawnTime = -1L
SoundUtils.createSound("note.pling", 0.7f).playSound()
+ SendTitleHelper.sendTitle("§cBlaze Pillar: §aExploded!", 500)
}
when (message) {
@@ -109,8 +110,10 @@ class BlazeSlayerPillar {
}
if (SkyHanniMod.feature.slayer.firePillarDisplay) {
- val format = DecimalFormat("0.0").format(remaining + 0.1)
- SkyHanniMod.feature.slayer.firePillarPos.renderString("§cBlaze Pillar: §a${format}s")
+ if (remaining > -0.5) {
+ val format = DecimalFormat("0.0").format(remaining + 0.1)
+ SendTitleHelper.sendTitle("§cBlaze Pillar: §a${format}s", 200)
+ }
}
}