Quark

Quark

191M Downloads

ResourceLocationException when using locales with non-arabic numerals

Closed this issue ยท 1 comments

commented

I'm not sure should this issue be fixed on Forge side or on Quark's, so I'll report this issue to both.
Forge issue: MinecraftForge/MinecraftForge#10529

Short description:
Quark (or Forge?) uses wrong locale when loading game resources, that causes Minecraft to crash with Non [a-z0-9/._-] character in path of location: quark:textures/model/entity/variants/cow\u0661.png when user's locale uses non-arabic numerals (\u0661 is Arabic-Indic Digit One)

Full crash stacktrace:

net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: quark:textures/model/entity/variants/cow\u0661.png
    at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.m_245185_(ResourceLocation.java:242)
    at TRANSFORMER/[email protected]/net.minecraft.resources.ResourceLocation.<init>(ResourceLocation.java:40)
    at TRANSFORMER/[email protected]/org.violetmoon.quark.content.client.module.VariantAnimalTexturesModule$Client.registerTextures(VariantAnimalTexturesModule.java:256)
    at TRANSFORMER/[email protected]/org.violetmoon.quark.content.client.module.VariantAnimalTexturesModule$Client.clientSetup(VariantAnimalTexturesModule.java:86)
    at TRANSFORMER/[email protected]/org.violetmoon.zetaimplforge.event.ForgeEventsRemapper.lambda$createForgeConsumer$3(ForgeEventsRemapper.java:132)
    ... 13 more
commented

Looks like our fault

textures.put(type, new ResourceLocation(Quark.MOD_ID, String.format("textures/model/entity/variants/%s%d.png", name, i)));

OMG, I had no idea String.format was locale-sensitive.