Jump to content

Play Custom Sound 1.8 [HELP]


Recommended Posts

Hello. I'm having problem with custom sounds with minecraft forge 1.8.





  "SwordAttack1": {"category": "master","sounds": [{"name": "SwordAttack1","stream": false}]}




Play Sound


        if (p.getCurrentEquippedItem().getItem() == Item.getByNameOrId("diamond_sword")) {

        p.getEntityWorld().playSoundAtEntity(p, "rca:SwordAttack1", 1.0F, 1.0F);



Where is "SwordAttack1" stored:


(rca = modid)




Where is sound.json stored:


(rca = modid)




Im getting "[Client thread/WARN]: Unable to play unknown soundEvent: rca:SwordAttack1".

SwordAttack1 is ogg file.

I hope someone can help me  ;D.

Link to comment
Share on other sites



Something easy to try first: try using all lower case for your SwordAttack1. 


The problem appears to be with your sounds.json not being found, or not registering the SwordAttack1 properly


You could try:

breakpoint in SoundManager.playSound() and inspect the registry in sndHandler.getSound to see if your sound was registered or not

breakpoint in SoundHandler.onResourceManagerReload() to see what happens when it tries to load your sounds.json



Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.