The bug
Decimal numbers are displayed by using the format(String format, Object... args)
method. However this method uses the current default Locale
to determine how the text needs to be formatted. This causes some inconsistency problems as for example using a computer with de
(German) as default locale will always use a comma as decimal seperator regardless of the current selected in-game language. A rather problematic bug caused by this is, that for example the text fields of the customized world generation invalidate themselves as only decimal numbers with a point as decimal seperator can be parsed.
How to reproduce (/worldborder set)
The feedback fo the /worldborder set
command uses commas as decimal mark instead of points in the default language:
[Client thread/INFO]: [CHAT] Set world border to 10,5 blocks wide (from 10,0 blocks)
How to reproduce (Customized world generation settings)
Open the world generation settings of a customized world
Go the fourth page (should contain text fields)
The text fields should have commas as decimal separator in case your default locale isde
Try to write something
You are unable to write because the comma invalidates the input, only after removing it you can add numbers
Possible fixes
Mapping for the chat the current in-game language to the according
Locale
and using for other GUIs theLocale.ENGLISH
For each formatting
format(Locale l, String format, Object... args)
Locale.setDefault(Locale.US);
when starting Minecraft
Personally I would prefer the first fix. Additionally instead of formatting with the method of the String
class, the DecimalFormat
class could be used
Linked issues
is duplicated by 1
Comments 10
Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.
This is an automated comment on any open or reopened issue with out-of-date affected versions.
Depending on country settings ?