coolAlias Posted March 13, 2017 Share Posted March 13, 2017 public static SoundEvent SOUND_LEVELUP; // Called from main class during FMLPreInitializationEvent public static void registerSounds() { SOUND_LEVELUP = registerSound(new ResourceLocation(ModInfo.ID, "levelup")); // etc. } private static SoundEvent registerSound(ResourceLocation location) { final SoundEvent sound = new SoundEvent(location).setRegistryName(location); return GameRegistry.register(sound); } During the loading process just before the SoundSystem starts, I receive an error message like the following for every single sound listed in my sounds.json file: File minecraft:sounds/special/levelup.ogg does not exist, cannot add it to event dynamicswordskills:levelup Note how it appears to be searching for the file with the 'minecraft' domain rather than my mod id, even though it shows the correct resource location just after that. I'm using Forge 1.9.4-12.17.0.1976. What am I doing wrong? Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Choonster Posted March 13, 2017 Share Posted March 13, 2017 (edited) The sound events in your sounds.json file have their resource domain set automatically from the file's resource domain, but the individual sound files used by the sound events don't, they need to be specified manually. Replace special/levelup with dynamicswordskills:special/levelup in your sounds.json file. Edited March 14, 2017 by Choonster Fixed sound file path 1 Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future. Link to comment Share on other sites More sharing options...
coolAlias Posted March 14, 2017 Author Share Posted March 14, 2017 Thanks! I do find it a little odd that the modid needs to be specified in the sounds.json file now - are there any cases where one would want to specify something else? Because you can always fetch sounds from Minecraft or other mods using the registry. Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Choonster Posted March 14, 2017 Share Posted March 14, 2017 Just now, coolAlias said: Thanks! I do find it a little odd that the modid needs to be specified in the sounds.json file now - are there any cases where one would want to specify something else? Because you can always fetch sounds from Minecraft or other mods using the registry. It's possible that you'd want to create a sound event that consists of a combination of vanilla files not present in any existing sound event. For example, a sound event consisting of minecraft:block/chorus_flower/grow1, minecraft:dig/cloth1 and youmod:foo/bar. There's no existing sound event with this combination of sound files. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future. Link to comment Share on other sites More sharing options...
coolAlias Posted March 14, 2017 Author Share Posted March 14, 2017 Huh, never thought of doing something like that. Nice. Cheers! Quote http://i.imgur.com/NdrFdld.png[/img] Link to comment Share on other sites More sharing options...
Recommended Posts
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.