diff options
author | ReyMaratov <musterjohn6@gmail.com> | 2023-09-02 14:06:32 +0200 |
---|---|---|
committer | ReyMaratov <musterjohn6@gmail.com> | 2023-09-02 14:06:32 +0200 |
commit | 86d4b87aa98996fd9db5662609662a448cac3158 (patch) | |
tree | 89bca9f7d9a93eadbfeb730783b5ebe4fc6ea524 /src | |
parent | 3971a5bff7b1ad8c57fb00d1920acbc94309801a (diff) | |
download | skyhanni-86d4b87aa98996fd9db5662609662a448cac3158.tar.gz skyhanni-86d4b87aa98996fd9db5662609662a448cac3158.tar.bz2 skyhanni-86d4b87aa98996fd9db5662609662a448cac3158.zip |
hopefully fixed low bps causing impossible ff
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobContestTimeNeeded.kt | 14 |
1 files changed, 13 insertions, 1 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 7b0f01015..f3b09d370 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 @@ -71,11 +71,21 @@ class JacobContestTimeNeeded { line = "§9${crop.cropName} §cNo ${currentBracket.displayName} §cMedal!" val cropFF = crop.getLatestTrueFarmingFortune() ?: 0.0 - val blocksPerSecond = crop.getLatestBlocksPerSecond() ?: 20.0 + var blocksPerSecond = crop.getLatestBlocksPerSecond() + if (blocksPerSecond == null) { + bracketText += "§0§l !" //hoping this never shows + blocksPerSecond = 19.9 + } else { + if (blocksPerSecond < 15.0) { + bracketText += "§4§l !" + blocksPerSecond = 19.9 + } + } val cropsPerSecond = amount.toDouble() / blocksPerSecond / 60 val ffNeeded = cropsPerSecond * 100 / 20 / crop.baseDrops val missing = (ffNeeded - cropFF).toInt() bracketText += " §7(${missing.addSeparators()} more FF needed!)" + } brackets.add(bracketText) if (bracket == currentBracket) { @@ -83,6 +93,7 @@ class JacobContestTimeNeeded { showLine = line } } + map[crop] = Renderable.hoverTips(showLine, buildList { add("§7Time Needed for §9${crop.cropName} Medals§7:") addAll(brackets) @@ -112,6 +123,7 @@ class JacobContestTimeNeeded { val text = map[crop]!! add(listOf(crop.icon, text)) } + addAsSingletonList("§eA§4§l ! §eindicates too low Blocks/Second. \nCalculations will use 19.9 instead.") } } |