Posted November 8, 201410 yr Hi all, I have a sounds.json file that looks like this: { "teleport_whoosh" : {"category": "block", "sounds": [{"name":"teleport_whoosh","stream":"false"]} } It is placed inside my assets/rftools/sounds folder. In code I try to play the sound like this: worldObj.playSoundAtEntity(teleportingPlayer, RFTools.MODID+":teleport_whoosh", 1.0f, 1.0f); But I get this error in the log and no sound: [07:59:50] [Client thread/WARN]: Unable to play unknown soundEvent: rftools:teleport_whoosh I also tried without RFTools.MODID+":" but that doesn't work either. What am I missing?
November 8, 201410 yr Hi An example from one of my mods resourceLocation = new ResourceLocation("speedytoolsmod:complex.boundarygrab"); sound file resources/assets/speedytoolsmod/sounds/complex/boundarygrabquiet.ogg in the json: { "complex.boundarygrab": {"category": "player", "sounds": ["complex/boundarygrabquiet"]} } Your json looks a bit different to mine, perhaps try the simpler format. The other bits look fine to me. -TGG PS the json file should be resources/assets/speedytoolsmod/sounds.json not resources/assets/speedytoolsmod/sounds/sounds.json perhaps that's the reason...
November 8, 201410 yr Author Thanks! Your suggestions fixed it. I misinterpreted this tutorial (http://www.minecraftforge.net/wiki/MrGReapers_tutorials/1.7.2_sound_tutorial) when it said: n your dev enviroment your resources folder will be in : root\src\main\resources\assets\modid in that modid folder you need to create a "sounds" folder and a sounds.json file So I thought the sounds.json should go inside the sounds folder. It works perfectly now.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.