aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 02:25:46 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-09-30 02:25:46 +0200
commita573502bb60a788515818a930507b55bb2a1de6a (patch)
tree751921652f2401a86c8a369eeda9ee0d23162e71 /src/main/java/at/hannibal2
parentb0c0a89625d5ec1e41199981ab5f94a363b808de (diff)
downloadskyhanni-a573502bb60a788515818a930507b55bb2a1de6a.tar.gz
skyhanni-a573502bb60a788515818a930507b55bb2a1de6a.tar.bz2
skyhanni-a573502bb60a788515818a930507b55bb2a1de6a.zip
fixed order
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt18
1 files changed, 9 insertions, 9 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 c9a010cef..be8871bd5 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
@@ -56,10 +56,10 @@ class BlazeSlayerDaggerHelper {
val first = Dagger.values()[SkyHanniMod.feature.slayer.blazeFirstDagger]
val second = first.other()
- textTopLeft = format(holding, true, first, lastNearest)
- textTopRight = format(holding, true, second, lastNearest)
- textBottomLeft = format(holding, false, first, lastNearest)
- textBottomRight = format(holding, false, second, lastNearest)
+ textTopLeft = format(holding, true, first)
+ textTopRight = format(holding, true, second)
+ textBottomLeft = format(holding, false, first)
+ textBottomRight = format(holding, false, second)
}
private fun findNearest(): HellionShield? {
@@ -73,11 +73,11 @@ class BlazeSlayerDaggerHelper {
return HellionShieldHelper.hellionShieldMobs
.filter { 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
+ if (a.getLorenzVec().distance(playerLocation) > b.getLorenzVec().distance(playerLocation)) 1 else 0
}.firstNotNullOfOrNull { it.value }
}
- private fun format(dagger: Dagger, active: Boolean, compareInHand: Dagger, nearestShield: HellionShield?): String {
+ private fun format(dagger: Dagger, active: Boolean, compareInHand: Dagger): String {
var daggerInHand = dagger
val inHand = dagger == compareInHand
@@ -91,17 +91,17 @@ class BlazeSlayerDaggerHelper {
}
return if (inHand && active) {
- if (nearestShield == null) {
+ if (lastNearest == null) {
"§7[" + shield.chatColor + shield.cleanName + "§7]"
} else {
- if ((shield == nearestShield)) {
+ if ((shield == lastNearest)) {
"§a[" + shield.chatColor + shield.cleanName.uppercase() + "§a]"
} else {
"§c[§m" + shield.chatColor + shield.cleanName + "§c]"
}
}
} else {
- if (shield == nearestShield) {
+ if (shield == lastNearest) {
"§6[" + shield.chatColor + shield.cleanName + "§6]"
} else {
shield.chatColor + shield.cleanName