You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree that some manner of formatting would be useful here, but it should be implemented using locale-sensitive number formatting rather than specifically commas.
The %,d will automatically add the locale specific separator.
Unfortunately, this only works on the client.
For multiblocks, the screen output is constructed on the server which means you have to do:
new TextComponentTranslatable("translation.key", number);
But TextComponentTranslatable doesn't support %,d
I don't know why, but somebody at mojang decided to trap this formatting and other formatting and convert it to %s
You can't even subclass TextComponentTranslatable because the network serialization is hardwired.
It might be possible to write a coremod that changes the allowable formats by changing the final variable
TextComponentTranslatable.STRING_VARIABLE_PATTERN
but who knows what that would break?
By adding commas ever 3 digits, the amount of energy stored in fusion reactors should become way more readable.
The text was updated successfully, but these errors were encountered: