aboutsummaryrefslogtreecommitdiff
path: root/src/main
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
commit480b557f89d358707b79c48c8549c87065007d51 (patch)
tree8c54348500dd8a27dcec5118ef7b1ecc22fbf674 /src/main
parent6f6ce67dc5a32488a5c7f80a540a3a841c7fcadb (diff)
downloadskyhanni-480b557f89d358707b79c48c8549c87065007d51.tar.gz
skyhanni-480b557f89d358707b79c48c8549c87065007d51.tar.bz2
skyhanni-480b557f89d358707b79c48c8549c87065007d51.zip
bigger blaze slayer warning text, hide event exp message, fixed wrong blaze slayer dagger display
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Features.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java7
-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
5 files changed, 11 insertions, 20 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java
index 605606d8a..4674e6cf1 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Features.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java
@@ -63,11 +63,6 @@ public class Features extends Config {
return;
}
- if (runnableId.equals("firePillar")) {
- editOverlay(activeConfigCategory, 200, 16, slayer.firePillarPos);
- return;
- }
-
if (runnableId.equals("ashfangResetCooldown")) {
editOverlay(activeConfigCategory, 200, 16, ashfang.nextResetCooldownPos);
return;
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 7038014b2..1aeaf5f33 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Slayer.java
@@ -1,6 +1,5 @@
package at.hannibal2.skyhanni.config.features;
-import at.hannibal2.skyhanni.config.core.config.Position;
import at.hannibal2.skyhanni.config.core.config.annotations.*;
import com.google.gson.annotations.Expose;
@@ -77,12 +76,6 @@ public class Slayer {
public boolean firePillarDisplay = false;
@Expose
- @ConfigOption(name = "Pillar Display Position", desc = "")
- @ConfigEditorButton(runnableId = "firePillar", buttonText = "Edit")
- @ConfigAccordionId(id = 3)
- public Position firePillarPos = new Position(10, 10, false, true);
-
- @Expose
@ConfigOption(name = "Pillar Sound", desc = "Custom countdown sound for the Fire Pillar timer and hide pillar build sound for the Blaze Slayer.")
@ConfigEditorBoolean
@ConfigAccordionId(id = 3)
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)
+ }
}
}