-
Bug
-
Resolution: Fixed
-
1.19, 1.19.1 Pre-release 4
-
None
-
Plausible
-
Crash
Steps to Reproduce
- Set system locale to Persian
- Download 1.19 client jar and libraries
- Put the jars in a folder
- Run java -Xmx1G -cp "*" net.minecraft.data.Main --client on the folder
- Observe the crash
Code analysis
using Yarn 1.19
In net.minecraft.data.client.ItemModelGenerator and BlockStateModelGenerator, String.format is used without passing locales:
register(compass, String.format("_%02d", new Object[] { Integer.valueOf(i) }), Models.GENERATED);
This is incorrect because the formatted number depends on the OS locale and might not be ASCII numerals if the OS locale is, say, Persian. The value is then passed to Identifier constructor which rejects non-ASCII values, causing a crash (like in MC-225853 )