aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-15 16:22:16 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-05-15 16:22:16 +0200
commit01d59b43bca59dc69ae7414a6d148d9fa2e6b893 (patch)
treea34ba8f611f0cc14e722397930b41d524c1dc946 /src/main/java/at/hannibal2
parentcd5366c3178eead1417722c2cb52dbfdd3887dd3 (diff)
downloadskyhanni-01d59b43bca59dc69ae7414a6d148d9fa2e6b893.tar.gz
skyhanni-01d59b43bca59dc69ae7414a6d148d9fa2e6b893.tar.bz2
skyhanni-01d59b43bca59dc69ae7414a6d148d9fa2e6b893.zip
Fixed logic error
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt
index c63f01069..f8792d8f2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt
@@ -63,16 +63,13 @@ class JacobContestTimeNeeded {
val timeInMinutes = amount.toDouble() / speed / 60
val formatDuration = TimeUtils.formatDuration((timeInMinutes * 60 * 1000).toLong())
val color = if (timeInMinutes < 20) "§b" else "§c"
- if (bracket == currentBracket) {
- sorted[crop] = timeInMinutes
- }
+ val line: String
var bracketText = "${bracket.displayName} $color$formatDuration"
if (timeInMinutes < 20) {
- showLine = "§9${crop.cropName} §b$formatDuration"
+ line = "§9${crop.cropName} §b$formatDuration"
} else {
- showLine =
+ line =
"§9${crop.cropName} §cNo ${currentBracket.displayName} §cMedal!"
-
val cropFF = crop.getLatestTrueFarmingFortune() ?: 0.0
val blocksPerSecond = crop.getLatestBlocksPerSecond() ?: 20.0
val cropsPerSecond = amount.toDouble() / blocksPerSecond / 60
@@ -81,13 +78,17 @@ class JacobContestTimeNeeded {
bracketText += " §7(${missing.addSeparators()} more FF needed!)"
}
brackets.add(bracketText)
+ if (bracket == currentBracket) {
+ sorted[crop] = timeInMinutes
+ showLine = line
+ }
}
map[crop] = Renderable.hoverTips(showLine, buildList {
add("§7Time Needed for §9${crop.cropName} Medals§7:")
addAll(brackets)
add("")
- val cropFF = crop.getLatestTrueFarmingFortune() ?: 0.0
- add("§7Current FF: §e${(cropFF).addSeparators()}")
+ val latestFF = crop.getLatestTrueFarmingFortune() ?: 0.0
+ add("§7Latest FF: §e${(latestFF).addSeparators()}")
val bps = crop.getLatestBlocksPerSecond()?.round(1) ?: 0
add("§7Blocks/Second: §e${bps.addSeparators()}")