aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-26 13:07:18 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-26 13:07:18 +0100
commitae48ef854f96fe5a6d60d9a52f9db680de77fdf3 (patch)
tree22085e5a85d22f0b628911defde894c4b751c3e4 /src/main/java/at/hannibal2/skyhanni/features/misc
parent53c653bfa52bc9a07a4308a1840ea9f2eafe0bcc (diff)
downloadskyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.tar.gz
skyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.tar.bz2
skyhanni-ae48ef854f96fe5a6d60d9a52f9db680de77fdf3.zip
New sort logic.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/CollectionCounter.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/tiarelay/TiaRelayHelper.kt3
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionCounter.kt
index 8ddf0eba7..f2b188787 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionCounter.kt
@@ -4,7 +4,6 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent
import at.hannibal2.skyhanni.features.bazaar.BazaarApi
import at.hannibal2.skyhanni.features.bazaar.BazaarData
-import at.hannibal2.skyhanni.test.GriffinJavaUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
@@ -95,11 +94,11 @@ class CollectionCounter {
}
private fun updateDisplay() {
- val format = GriffinJavaUtils.formatInteger(itemAmount)
+ val format = LorenzUtils.formatInteger(itemAmount)
var gainText = ""
if (recentGain != 0) {
- gainText = "§a+" + GriffinJavaUtils.formatInteger(recentGain)
+ gainText = "§a+" + LorenzUtils.formatInteger(recentGain)
}
display = "$itemName collection: §e$format $gainText"
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
index 44e9332f4..5adafb6b4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
@@ -64,7 +64,7 @@ class NonGodPotEffectDisplay {
totalEffectsCount = 0
checkFooter = true
}
- for (effect in GriffinJavaUtils.sortByValue(activeEffects)) {
+ for (effect in activeEffects.sorted()) {
val label = effect.key
val until = effect.value
val seconds = (until - now) / 1000
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/tiarelay/TiaRelayHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/tiarelay/TiaRelayHelper.kt
index d846ac42b..a622fa02a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/tiarelay/TiaRelayHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/tiarelay/TiaRelayHelper.kt
@@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.LorenzUtils.sorted
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
@@ -91,7 +92,7 @@ class TiaRelayHelper {
resultDisplay.clear()
var i = 1
- for (entry in pitchMap.toList().sortedBy { (_, value) -> value }.toMap()) {
+ for (entry in pitchMap.sorted()) {
resultDisplay[entry.key] = i
i++
}