aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-05 00:15:59 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-10-05 00:15:59 +0200
commitd7e00bac87aa94914da54b1dfc18b548e5aa066e (patch)
tree28939999e3c8ab85e1b1d370e47f810dec7bab3f /src
parent0cfc19d890cac15b49433d170a16ae6d56dcfb16 (diff)
downloadskyhanni-d7e00bac87aa94914da54b1dfc18b548e5aa066e.tar.gz
skyhanni-d7e00bac87aa94914da54b1dfc18b548e5aa066e.tar.bz2
skyhanni-d7e00bac87aa94914da54b1dfc18b548e5aa066e.zip
Yaw/pitch display does no longer show scientific notations at small values
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
index 342812c39..4eafa6a38 100755
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenYawAndPitch.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.GardenToolChangeEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.round
+import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators
import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import net.minecraft.client.Minecraft
@@ -39,9 +40,11 @@ class GardenYawAndPitch {
if (!config.showAlways && lastChange.passedSince() > config.timeout.seconds) return
+ val yawText = yaw.round(config.yawPrecision).addSeparators()
+ val pitchText = pitch.round(config.pitchPrecision).addSeparators()
val displayList = listOf(
- "§aYaw: §f${yaw.round(config.yawPrecision)}",
- "§aPitch: §f${pitch.round(config.pitchPrecision)}",
+ "§aYaw: §f$yawText",
+ "§aPitch: §f$pitchText",
)
if (GardenAPI.inGarden()) {
config.pos.renderStrings(displayList, posLabel = "Yaw and Pitch")