Posted August 23, 201510 yr Hello. I'm having problem with custom sounds with minecraft forge 1.8. sounds.json { "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) src\main\resources\assets\rca\sounds Where is sound.json stored: (rca = modid) src\main\resources\assets\rca Im getting "[Client thread/WARN]: Unable to play unknown soundEvent: rca:SwordAttack1". SwordAttack1 is ogg file. I hope someone can help me .
August 23, 201510 yr Hi 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 -TGG
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.