mojira.dev
MC-19766

/playsound command not playing sounds with custom file names

When creating a sound with a custom file name, and using the playsound command to play that sound, it does not play. For example if a folder called custom is created in a resourcepack, and a custom .ogg file with a custom name is placed in it, you would normally to play the sound in game use the command "/playsound custom.FILENAME PLAYERNAME", but no sound plays.
I don't know if this is a bug, or just a missing feature.

Linked issues

Comments 16

You can't reproduce custom sounds. That feature isn't in game. (yet)

Adding custom sounds to minecraft (Custom file names/folders) will give map makers and server owners a great tool for making extensive soundtracks for multiple areas in there map or server. This isn't really possible at the moment because the amount of sounds are just too limited.

I hope this will be added, seems very useful!

Edit:
Maybe this could help: When the file exists in the "Default" folder (assets) then you're able to replace it.

If you put the custom sound in Minecraft's own asset folder it works. I've set the command to play it and it didn't work. I then exited Minecraft fully and reloaded and enterted the map again. The sound then played perfectly. I cannot make this work if it is part of a resource pack though, whether zipped or unzipped.

To make it easy for map/server users we really need custom sound support for the resource pack. I hope you know why 🙂

6 more comments

This would be amazing if it got fixed/added.

I made a ticket that duplicated so it got closed, but here were some of my ideas.
When minecraft starts the SoundManager only loads sound names from the default resource pack in the minecraft directory.

Possible Solution:
Create a secondary list of sounds in the SoundPool and update it when a player loads a new resource pack.

SoundManager use %appdata%\.minecraft\assets\sound as source of file list. Adding new folders and files there, and you can use them in game. I test it and it's work.
After adding them to assets, you can change them in resource and game will use custome file from resource, but they still need to be in assets.
I don't know why you need secondary list of sounds in the SoundPool, game only need to update existing one. Best, to keep it clean, clear old list and make new one, first using chosen resource pack and then take rests from assets (where default file are stored).

So for now, if someone need add completely new sound file, just add them to assets folder.

ps
Also, I think that Mojang should separate textures and sound resources. Right now, if you download some changed sounds, you need to put them in every resource pack that you use.
I think about option to use separate sound resource pack. That only reload sound file, so it don't need separate code for this, just invoke reload SoundManager.
But it's just an idea 😉

Not a bug. Working as intended.

So Mojang won't allow mapmakers to add they custom sound? Strange.
This make people to use way around, mess up with original files. As far as I know, Mojang is against this, but they force us to do this that way...

Anyway, thanks for your respond 🙂

Marius Christian Skyum Hauge

Erik Broes

Unconfirmed

missing

Minecraft 1.6.1

Retrieved