Closed crazysmc closed 2 months ago
Thanks for the report! This is definitely a flaw in the implementation, it should check whether the resource exists before attempting to load it, or otherwise catch any exceptions for each individual call, so it can try the next path. I reckon this affects pretty much any version range of the Resource Loader...
From what I understand, it is intended that when
lang/en_US.lang
is not found,lang/en_US.lang
,lang/en_us.lang
,lang/en_us.json
are tried as fallbacks.I tried to load a
lang/en_us.lang
instead oflang/en_US.lang
in Minecraft 1.10.2 but aftergetResources
in Minecraft'sTranslationStorage
throws aFileNotFoundException
, thethis.load(list)
call and itsWrapOperation
handler are skipped. Thus, no alternate paths are loaded.net.minecraft.client.resource.language.TranslationStorage#load(net.minecraft.client.resource.manager.ResourceManager, java.util.List<java.lang.String>)
Also if a following
getResources
call in the mixin at https://github.com/OrnitheMC/ornithe-standard-libraries/blob/4264a82c7456a71607826237550655514d5704dd/libraries/resource-loader/resource-loader-mc13w26a-mc1.10.2/src/main/java/net/ornithemc/osl/resource/loader/impl/mixin/client/TranslationStorageMixin.java#L45-L50 throws an exception, the rest of the loop is skipped.The same code appears in other version ranges of the
resource-loader
library.As a workaround I could add empty
lang/en_US.lang
andlang/en_US.json
files to my assets and thenlang/en_us.lang
will be loaded correctly, but I am afraid that this causes problems on case-insensitive filesystems.