Jump to content

Recommended Posts

Posted

Hey,

So I am trying to code a mod that plays giornos theme when you win a game of SW or BW on the hypixel network. When I run the code to play the sound I get the error/warning:

Unable to play empty soundEvent: memesounds:giornos_theme

 
Here is all of my *amazing* code.

 

Code to play sound:

player.addChatMessage(new ChatComponentText("New Message >> " + message));

Location of sound file:

resources/assets/memesounds/sounds

sounds.json which is located in resources/assets/memesounds

{
  "giornos_theme": {"category": "ambient","sounds": [{"name": "giornos_theme","stream": false}]}
}

 

Posted (edited)
  On 4/29/2020 at 12:57 PM, Miqhtie said:

sounds.json which is located in resources/assets/memesounds

{
  "giornos_theme": {"category": "ambient","sounds": [{"name": "giornos_theme","stream": false}]}
}

 

Expand  

You need to put your modid in front of name. ("name": "memesounds:giornos_theme")

 

  

  On 4/29/2020 at 12:57 PM, Miqhtie said:

Code to play sound:

player.addChatMessage(new ChatComponentText("New Message >> " + message));
Expand  

You play your sound by adding a chat message? Okay

Edited by Boy132
Posted

None of the code you posted is relevant to playing the sound.

Please post more of your code.

Some tips:

  Reveal hidden contents

 

Posted (edited)

Didn't work. 

  On 4/29/2020 at 1:04 PM, Boy132 said:

You need to put your modid in front of name. ("name": "memesounds:giornos_theme")

Expand  

What parts am I missing. 

  On 4/29/2020 at 1:05 PM, DavidM said:

None of the code you posted is relevant to playing the sound.

Please post more of your code.

Expand  

 

Edited by Miqhtie
Posted
  On 4/29/2020 at 1:08 PM, Miqhtie said:

What parts am I missing. 

Expand  

The part of the code where you actually play the sound...

Some tips:

  Reveal hidden contents

 

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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