Jump to content

[1.7.2]Custom sound register and play


FLUFFY2

Recommended Posts

So i updating my mod to 1.7.2 and i have an issue where SoundManager was removed.

 

What i come up with so far:

Renamed folde "sound" to "sounds"!

Created a sounds.json file!

 

My sounds.json:

 

 

{

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

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

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

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

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

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

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

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

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

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

}

 

 

 

So the problem is i can't play my sound.

/playsound command and world.playSoundAtEntity not working for me!

 

I got a little error:

"Unable to play unknown soundEvent: fluffy:Flashlighton"

Link to comment
Share on other sites

Okey there is my code:

 

modid:Lantern

 

Folder: assets.fluffy.sounds

 

sounds.json:

 

 

{

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

  }

 

 

 

Playing the sounds:

world.playSoundAtEntity(player, "Lantern:Candle", 1F, 1F);

 

Error:

Unable to play unknown soundEvent: lantern:Candle

 

Thanks for helping!

 

 

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.

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.

×
×
  • Create New...

Important Information

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