mojira.dev
MC-92475

/playsound doesn't work with resource pack sounds

If I use the /playsound command to play a default sound with the new names, like entity.pig.ambient, it works fine. But if I try to play a sound added by a resource pack, I get no sound, even though it says it's been played successfully.

To make sure, in my resource pack's assets/minecraft folder, I have a sounds.json file defining the following event:

{
  "magikos.wand": {
    "category":"ambient",
    "sounds": ["magikos/wand"]
  }
}
{
  "magikos.wand": {
    "category":"ambient",
    "sounds": ["magikos/wand"]
  }
}

In its assets/minecraft/sounds folder, I have a directory called magikos and in there, an OGG file called wand.ogg. I reload the resource pack in-game with F3+T, and when I try to use /playsound magikos.wand @p, I get the successful message but no sound.

Again, it works perfectly fine with the built-in sounds like entity.pig.ambient, and all my sound options are turned up to 100% and working fine naturally. It's just resource pack sounds that don't work.

EDIT Attached the actual resource pack, which is just for testing so far. And the exact command I'm trying to use (again, testing by entering it directly into the chat) is simply /playsound magikos.wand @p, but it has the same non-effect if I specify the rest of the optional parameters as well.

Attachments

Comments 7

Attach the resource pack, and exact command used

Updated with the resource pack I'm using for testing and the command. The resource pack is in progress, hence the incorrect pack icon.

That sound file is broken / uknown format / whatever:

[08:20:40] [Server thread/INFO]: [Kumasasa: Played sound 'magikos.wand' to Kumasasa]
[08:20:40] [Client thread/INFO]: [CHAT] Played sound 'magikos.wand' to Kumasasa
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Sound buffer null in method 'loadSound'
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Source '980707b2-1fd1-4e42-aaca-025d331d14fb' was not created because an error occurred while loading minecraft:sounds/magikos/wand.ogg
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Source '980707b2-1fd1-4e42-aaca-025d331d14fb' not found in method 'play'
[08:20:40] [Server thread/INFO]: [Kumasasa: Played sound 'magikos.wand' to Kumasasa]
[08:20:40] [Client thread/INFO]: [CHAT] Played sound 'magikos.wand' to Kumasasa
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Sound buffer null in method 'loadSound'
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Source '980707b2-1fd1-4e42-aaca-025d331d14fb' was not created because an error occurred while loading minecraft:sounds/magikos/wand.ogg
[08:20:40] [Thread-8/ERROR]: Error in class 'LibraryLWJGLOpenAL'
[08:20:40] [Thread-8/ERROR]: Source '980707b2-1fd1-4e42-aaca-025d331d14fb' not found in method 'play'

The sound file itself is an OGG Vorbis file, the type that's supposedly supported and required by resource packs. It plays fine in every media player app as an OGG file. If it's not loading in properly, I'd consider that a bug, no?

No, the sounds I add in my packs play fine, your soud is incorectly converted, or something like that

I've provided the pack with the sound in it; mind telling me exactly what's wrong with it? As I've said, it's an OGG Vorbis file with proper encoding that plays just fine in everything except Minecraft. If there's some special formatting quirk that Minecraft needs, I haven't heard of it anywhere. In addition, the library used for Minecraft's sounds (the Lightweight Java Games Library's Open Audio Library) generally gives specific errors when the issue involves failed decoding or unsupported formats, which it's not giving here. So unless there's something more specific wrong with my audio file, this isn't a case of user error, but rather a fringe-case bug that should be looked into. (Note also that this problem occurs with any and all OGG files I've tried, not just the one in the attached resource pack.)

how do you make them ogg?
if I have a .mp3 file, I convert it using http://audio.online-convert.com/convert-to-ogg
it never fails to play my sounds, so it has to be a user error

just bare in mind that this is a bug tracker, and not a help forum

Daniel Burnett

(Unassigned)

Unconfirmed

Minecraft 15w45a

Retrieved