Jump to content

[1.7.2] [Tutorial] adding custom sounds to your mod


mrgreaper

Recommended Posts

Ok this is a video Tutorial to add sounds to your mod.

 

**********************************************************

*                                                The Video                                                *

*                  http://www.youtube.com/watch?v=MTGJXO_2Kks              *

*                                                                                                                *

**********************************************************

 

The text version (not as good as the video)

 

in your dev enviroment your resources folder will be in : root\src\main\resources\assets\modid

in that modid folder you need to create a "sounds" folder and a sounds.json file (blank text file will do)

 

lets take the sounds.json file from my video :

 

{
   "bunnyBegA": {"category": "master","sounds": [{"name": "bunnyBegA","stream": false}]},
   "bunnyBegB": {"category": "master","sounds": [{"name": "bunnyBegB","stream": false}]},
   "bunnyRelease": {"category": "master","sounds": [{"name": "bunnyRelease","stream": false}]}
   }

 

now lets break one line down

"bunnyBegA": {"catagory": "master","sounds": [{"name": "bunnyBegA","stream": false}]},

#NAME OF FILE MINUS EXTENSION1#: {"catagory": #NAME OF CATEGORY IT BELONGS TO# ,#FOLDER ITS LOCATED IN#: [{"name": #NAME OF FILE MINUS EXTENSION2#,"stream": #IS IT LONG#}]}#COMMA#

 

 

#NAME OF FILE MINUS EXTENSION1#  = if your file is called bunnyBegA.ogg then this is "bunnyBegA.ogg"

#NAME OF CATEGORY IT BELONGS TO# = the category of the sound, for the new 1.7.2 volume control (i dont know all the categories but im sure a search of the default json will show you them :) 

#FOLDER ITS LOCATED IN# = sounds of course

#NAME OF FILE MINUS EXTENSION2# = same as #NAME OF FILE MINUS EXTENSION1# (its possible that the first one can be anything as its the internal name, but you may as well keep it as the files name, there is no reason not to after all

#IS IT LONG# =set this to true if its a long sound file, i dont know the impact this has on mc itself so only set to true if it dont play right in false is my advice!

#COMMA# = theres more entrys to come.... no comma on the last one!

 

Hope you enjoyed the guide and video :)

 

 

Mods : i am trying to put this on the wiki now

Link to comment
Share on other sites

  • 1 month later...

Thanks for this! I was wondering how to go about this. Turns out you can define multiple sounds in one line:

"armorbreak": {"category": "player","sounds": ["armorbreak1", "armorbreak2", "armorbreak3", "armorbreak4"]}

and then play them with just the registered string to get a randomized sound from within. Lots of cool stuff to learn in the vanilla sounds.json file. ;)

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.

Announcements



×
×
  • Create New...

Important Information

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