diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 02:25:46 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2022-09-30 02:25:46 +0200 |
commit | a573502bb60a788515818a930507b55bb2a1de6a (patch) | |
tree | 751921652f2401a86c8a369eeda9ee0d23162e71 /src/main/java/at/hannibal2/skyhanni/features/slayer | |
parent | b0c0a89625d5ec1e41199981ab5f94a363b808de (diff) | |
download | skyhanni-a573502bb60a788515818a930507b55bb2a1de6a.tar.gz skyhanni-a573502bb60a788515818a930507b55bb2a1de6a.tar.bz2 skyhanni-a573502bb60a788515818a930507b55bb2a1de6a.zip |
fixed order
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt | 18 |
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 |