Chokes on assets with spaces in filename
MeeniMc opened this issue ยท 3 comments
The following resource pack fails to load due to having spaces in some asset names
UltimaCraft_Enchantments_(b.1.0).zip (https://www.curseforge.com/minecraft/texture-packs/ultimacraft-enchantments)
Obviously the pack works with OF.
See full log below
selected resourcepacks
java.util.concurrent.CompletionException: net.minecraft.class_151: Non [a-z0-9/._-] character in path of location: minecraft:optifine/cit/enchanted_items/armor/05-aqua_affinity/diamond_armor_aqua affinity.properties
at Not Enough Crashes deobfuscated stack trace.(1.17+build.10) ~[?:?]
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1766) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1756) ~[?:?]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295) ~[?:?]
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016) ~[?:?]
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665) ~[?:?]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598) ~[?:?]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) ~[?:?]
Caused by: net.minecraft.class_151: Non [a-z0-9/._-] character in path of location: minecraft:optifine/cit/enchanted_items/armor/05-aqua_affinity/diamond_armor_aqua affinity.properties
at net.minecraft.util.Identifier.<init>(Identifier:41) ~[?:?]
at net.minecraft.util.Identifier.<init>(Identifier:50) ~[?:?]
at net.minecraft.resource.ZipResourcePack.findResources(ZipResourcePack:134) ~[?:?]
at shcm.shsupercm.fabric.citresewn.pack.CITParser.parse(CITParser.java:40) ~[CITResewn-0.4.4.jar:?]
at net.minecraft.client.render.model.ModelLoader.handler$znd000$addCITModels(ModelLoader:1142) ~[?:?]
at net.minecraft.client.render.model.ModelLoader.addModel(ModelLoader:465) ~[?:?]
at net.minecraft.client.render.model.ModelLoader.<init>(ModelLoader:193) ~[?:?]
at net.minecraft.client.render.model.BakedModelManager.prepare(BakedModelManager:52) ~[?:?]
at net.minecraft.client.render.model.BakedModelManager.prepare(BakedModelManager:19) ~[?:?]
at net.minecraft.resource.SinglePreparationResourceReloader.method_18791(SinglePreparationResourceReloader:11) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1764) ~[?:?]
... 6 more
See issue #3.
After much consideration and a suggestion that was given in #9, I've decided to allow broken paths and block it behind both a config option that defaults to not allow broken paths as well as mark the packs incompatible in the resourcepack selection screen.
This has been implemented in v0.5.0.
Still this is very experimental and no bugs that derive from the config option being enabled will be resolved.