Skip to content

Keep number formatting on the player's locale - #340

Open
Eldrinn-Elantey wants to merge 1 commit into
masterfrom
fix/restore-format-locale
Open

Keep number formatting on the player's locale#340
Eldrinn-Elantey wants to merge 1 commit into
masterfrom
fix/restore-format-locale

Conversation

@Eldrinn-Elantey

@Eldrinn-Elantey Eldrinn-Elantey commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

ServerUtilities replaces the JVM default locale with US in preInit and never puts it back. That switches the formatting category too, so mods loading afterwards print numbers in English no matter what the player runs. The US default still covers case conversions, which is what the original line was there for.

formatDouble0 and formatDouble00 trim the fraction by looking for a dot, so both formatters now take Locale.ROOT.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant