diff options
author | Linnea Gräf <roman.graef@gmail.com> | 2023-10-18 16:12:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 16:12:19 +0200 |
commit | e0a2f5f5991048317f5c045feca084a1413c45fd (patch) | |
tree | 7e4e8795aa98e58d6df467598b82c1c53997c869 /src/main/kotlin | |
parent | 5ad2c41fb936fbb9927aa0b73c73f93f9fd1c3a0 (diff) | |
download | NotEnoughUpdates-e0a2f5f5991048317f5c045feca084a1413c45fd.tar.gz NotEnoughUpdates-e0a2f5f5991048317f5c045feca084a1413c45fd.tar.bz2 NotEnoughUpdates-e0a2f5f5991048317f5c045feca084a1413c45fd.zip |
Add calculator precision option (#882)
* Add calculator precision option
* Fix loading of minecraft classes from some tests
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/MiscCommands.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/MiscCommands.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/MiscCommands.kt index 64ee444b..422871b4 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/MiscCommands.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/MiscCommands.kt @@ -40,7 +40,6 @@ import net.minecraft.client.renderer.OpenGlHelper import net.minecraft.util.ChatComponentText import net.minecraft.util.EnumChatFormatting.* import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.text.DecimalFormat import java.util.* import java.util.concurrent.CompletableFuture @@ -53,7 +52,7 @@ class MiscCommands { val calculation = this[calculation] try { val calculate = Calculator.calculate(calculation, NeuSearchCalculator.PROVIDE_LOWEST_BIN) - val formatter = DecimalFormat("#,##0.##") + val formatter = Calculator.getDecimalFormat() val formatted = formatter.format(calculate) reply("$WHITE$calculation $YELLOW= $GREEN$formatted") } catch (e: CalculatorException) { |