Exponent notation of float numbers begin too early
Currently float numbers (after conversion to string) are displayed using exponent notation if they are greater than 10^7, which is still within the limits of a normal Minecraft world, making it difficult to read if using Meteor Client to display coordinates beyond this point. There doesn't seem to be any workarounds.

https://github.com/MeteorDevelopment/starscript/blob/20764f00d4dc47c4f6a8d4dd8d55b3220ceca104/src/main/java/org/meteordev/starscript/value/Value.java#L136
Only happens with Double.toString(), so if the number has a fractional part, and is 10000000 or above
Probably possible to bypass it by rounding to an integer if the value reaches the threshold, so something like {z >= 10000000 ? round(z) : z}
Yes I'm currently using this, having figured it out some hours ago. But it would be nicer if I'm still able to see some decimal places (i round them to 2 decimal places because sometimes I want to align myself to the center of tunnels).
Yes I'm currently using this, having figured it out some hours ago. But it would be nicer if I'm still able to see some decimal places (i round them to 2 decimal places because sometimes I want to align myself to the center of tunnels).
You can do {round(x * 100) / 100} to achieve 2 decimal places iirc
You can do
{round(x * 100) / 100}to achieve 2 decimal places iirc
No, that still gives exponent notation. Thanks for the help tho
You can do
{round(x * 100) / 100}to achieve 2 decimal places iircNo, that still gives exponent notation. Thanks for the help tho
Oh yeah you cant easily have both decimals and regular notation
@Xenapte a bit late on this, but Pos: #1{player.pos.x >= 10000000 ? round(player.pos.x) : round(player.pos.x * 100) / 100} {round(player.pos.y * 100) / 100} {player.pos.z >= 10000000 ? round(player.pos.z) : round(player.pos.z * 100) / 100} should be what you're after
Sorry for the late reply, but still the problem persists using this (I wanted to see 2 decimal places for numbers larger than 10 million) - though I did tweak this to be more robust for different coordinates: Pos: #1{abs(player.pos.x) >= 10000000 ? floor(round(player.pos.x)) : round(player.pos.x, 2)}, {round(player.pos.y, 2)}, {abs(player.pos.z) >= 10000000 ? floor(round(player.pos.z)) : round(player.pos.z, 2)}. For now I'm going to just try to get used to integer displays for large numbers.
Sorry for the late reply, but still the problem persists using this (I wanted to see 2 decimal places for numbers larger than 10 million) - though I did tweak this to be more robust for different coordinates:
Pos: #1{abs(player.pos.x) >= 10000000 ? floor(round(player.pos.x)) : round(player.pos.x, 2)}, {round(player.pos.y, 2)}, {abs(player.pos.z) >= 10000000 ? floor(round(player.pos.z)) : round(player.pos.z, 2)}. For now I'm going to just try to get used to integer displays for large numbers.
Yeah I will try to fix the big decimals in the starscript source itself
Thanks!