Note: This might be WAI.
Sound file names referenced by sound entry in the sounds.json file do not need the prefix minecraft. However, if a resource pack contains a sounds.json in an external folder (for example custom), then all sound file names in this sounds.json file need the prefix custom:, otherwise they use minecraft: as prefix. For plugins this might be pretty annoying and inconvenient because they will very likely refer to many external sound files.
Resource pack structure:
The bug is that the sound of custom:testfolder.testsound is loaded as minecraft:testfolder/testsound despite being in the custom folder. You need to add custom: as prefix to prevent that.
- Load the attached resource pack (External sound test.zip)
- Use the following command (does not use prefix)
→ The sound won't play because it is loaded with the minecraft prefix
- Use the following command
→ The sound will play because the prefix is provided
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
This happens because the method net.minecraft.client.audio.SoundListSerializer.deserializeSound(JsonObject) creates a Sound object with the given name, which uses the minecraft: prefix if no other prefix is specified.