CompactStorage

CompactStorage

11M Downloads

Usage of toLowerCase() without specifying locale

Poopooracoocoo opened this issue · 2 comments

commented

Describe the bug
Causes error loading resourcepacks on game launch on locales with the dotless i "ı" such as Turkish.

Java's toLowerCase() method converts "i" to "ı" which is then encoded into \u0131 which is an invalid identifier

Caused by: net.minecraft.class_151: Non [a-z0-9/._-] character in path of location: compact_storage:textures/block/chest/wh\u0131te_chest.png

You should be using Locale.ROOT or Locale.ENGLISH to prevent this conversion.

CHEST_TEXTURES.put(CompactStorage.COMPACT_CHEST_BLOCKS[i].get(), ResourceLocation.fromNamespaceAndPath("compact_storage", String.format("textures/block/chest/%s_chest.png", DyeColor.byId(i).name().toLowerCase())));

String dyeName = DyeColor.byId(i).getName().toLowerCase();

To Reproduce
Launch game with CompactStorage with Turkish locale

Expected behavior
No issue

commented

Also reported in #182

commented

Sorry for the delay in responding to this, rest assured I will be looking at this in the next few days.