When attempting to replace vanilla assets, by placing advancements or loot tables in the world/datapacks/my_pack/data/minecraft folder, the game crashes, giving you the following error:
Couldn't execute command for CreeperMagnet_: reload
java.lang.IllegalArgumentException: Non [a-z0-9/._-] character in path
at mp.<init>(SourceFile:31)
at mp.<init>(SourceFile:44)
at rf.a(SourceFile:112)
at rf.a(SourceFile:97)
at rx.a(SourceFile:137)
at sc.a(SourceFile:84)
at bjl.a(SourceFile:52)
at sc.c(SourceFile:132)
at sc.a(SourceFile:115)
at net.minecraft.server.MinecraftServer.a(SourceFile:1297)
at net.minecraft.server.MinecraftServer.aF(SourceFile:1280)
at op.a(SourceFile:16)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:119)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:76)
at bl.a(SourceFile:184)
at qx.c(SourceFile:864)
at qx.a(SourceFile:851)
at ki.a(SourceFile:37)
at ki.a(SourceFile:9)
at hc$1.run(SourceFile:13)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at h.a(SourceFile:123)
at net.minecraft.server.MinecraftServer.w(SourceFile:628)
at net.minecraft.server.MinecraftServer.v(SourceFile:584)
at cku.v(SourceFile:152)
at net.minecraft.server.MinecraftServer.run(SourceFile:489)
at java.lang.Thread.run(Thread.java:745)
This says there is a non- a-z0-9/-._ character, when there is clearly not.
Attached is a data pack (bug_pack.zip) that demonstrates this by trying to replace the abandoned mineshaft loot table with one that makes it give only golden apples.
This doesn't affect adding custom loot tables, as also demonstrated in the other data pack. (stick_pack)
You can see this by using stick_pack, and giving yourself a chest using
/give @s chest{BlockEntityTag:{LootTable:"stick_pack:stick"}}
This clearly gives you a custom loot table chest, with only a stick inside.
EDIT:
This error, as of 17w47b, we now know is caused only on Apple computers, because of Apple's folder info storage data, the .DS_Store file. This name has capital letters, and the game attempts to read it as a loot table for some reason, bringing out an error, as capital letters aren't supported. This only seems to occur when trying to replace vanilla assets.
Related issues
duplicates
Attachments
Comments


Just wanted to put this here since the 17w47b snapshot sheds a little more light on what's going on:
Essentially, it's a direct result of the .DS_store bug (MC-121380), giving the error:
Non [a-z0-9/._-] character in path of location: <namespace>:loot_tables/.DS_Store
Not sure why it gives the false error, even though '.DS_Store' technically only has [a-z0-9/._-] characters...
~ WitheredAway

capitals arenโt included in there, capitals are not allowed by the game.

This issue should be closed, as it was caused by the .DS_store bug, along with the game attempting to load non-json files. ๐