Minecraft Blogs / Tutorial

How to direct, replace and add sounds in Minecraft | Learn Everything about Sounds

  • 4,668 views, 8 today
  • 13
  • 7
  • 5
DERPWARE's Avatar DERPWARE
Level 65 : High Grandmaster Lumberjack
334

How to direct, replace and add sounds in Minecraft | Learn Everything about Sounds
How to direct, replace and add sounds in Minecraft | Learn Everything about Sounds
Adding Sounds

If any texture pack beginner is viewing this and is frustrated by the fact that, as I used to think, you can only replace sounds and not add more variations or rare ones you may want, or to direct the sound files somewhere else, I will tell you this: this is possible, but is still limited in some ways, mainly when you are advanced in it and you know the borders of how much you can do. Just right now we will just go over the basics.

I have scavenged the internet searching for some specific and more advanced documentation of sounds, but they would constantly keep saying just how to replace sounds, not add more or remove more, or other basic information, things I already knew. I would preferably say, this very well might be the post you have been searching for. If not, ask a question below. I believe I have almost known all the information about sounds in Minecraft.

First, you need a directory file. If you are a beginner, just bear with me. These are the basics, and they are not as hard as they look.

This method is a file named "sounds.json", and it is placed, in your texture pack, in the assets > minecraft folders.
Sounds.json can also be used to direct, add, or remove sounds from playing in the game. for example, if I wanted to add a death sound to sheep, and a hurting sound to sheep besides the normal sounds, I could not do that without sounds.json. So what I do is make this file, and paste this script inside it:

{
"entity.sheep.hurt": {
"sounds": [
{ "name": "mob/sheep/hurt1" },
{ "name": "mob/sheep/hurt2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.hurt"
},
"entity.sheep.death": {
"sounds": [
{ "name": "mob/sheep/death1" },
{ "name": "mob/sheep/death2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.death"
}
}

Placing the sounds
since this script is finished, now we must make the sounds. if you do not have a folder (not file) named sounds, make one inside the minecraft folder in your texture pack. then, follow the directory which sounds.json says:
you make sounds folder, then make a folder named "mob," then make a folder named "sheep," and now for the sounds. this is seen in the script below:

{ "name": "mob/sheep/death1" },
{ "name": "mob/sheep/death2" }

imagine in the "mob/sheep/death" directory here, imagine it is automatically directed inside of the sounds folder, so imagine there is an imaginary "sounds/" behind the "mob" like "sounds/mob/sheep/death". this is only for helping when directing, because if you did "sounds/mob/sheep/death" it would direct it to "sounds/sounds/mob/sheep/death," and we don't want that, theres only one sounds folder.

Recommendation
for making sounds, I would recommend something like Audacity, because you can export sounds into .ogg sound files. So, if you have Audacity installed, or once you do, you can make your custom sound inside Audacity.
Once you're done doing that, export that sound, if you want it to be the hurting sound of the sheep, hurt1 or hurt2, then take the exported .ogg file you just made and paste it inside the sheep folder, and you have your own sound.

Do these with the other sounds defined in sounds.json.

Adding more varations
now, perhaps you want more variations to the sheep sound, more than just two. what you would do is, look at what the arrows are pointing at:
{
"entity.sheep.hurt": {
"sounds": [
{ "name": "mob/sheep/hurt1" }, <----[take notice this has a comma]
{ "name": "mob/sheep/hurt2" } <----[add a comma, copy the first sound directory and paste it like the one below]
{ "name": "mob/sheep/hurt3" } <----[this one was copied from the first. remove the comma]
], "replace": "true", "subtitle": "subtitles.entity.sheep.hurt"
},
"entity.sheep.death": {
"sounds": [
{ "name": "mob/sheep/death1" },
{ "name": "mob/sheep/death2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.death"
}
}

Making mobs or blocks silent
while you can add as many sounds as you want, you can remove sounds. let's say you want to make a mob silent.
theres two ways to do this:
not efficient route
replace each sound file with silence, which is not efficient and makes the pack size bigger
does not "remove" the sound files
shows subtitle.
efficent route
let's say i wanted to make the sheep silent. in order to do this, i would type something like this:

{
"entity.sheep.ambient": {
"sounds": [
{ "name": "nothing" }
], "replace": "true", "subtitle": ""
}
}

this makes the mob completely silent without showing any subtitles, whereas just replacing the current sounds only makes you only hear silence but still shows a subtitle.

The only disadvantage of the "efficient" route is that it displays error logs in your Minecraft logs every time it plays this sound, but that's not much to be concerned about.

Custom Subtitles
In the string "subtitle": "", just put what you want, like "John sighs" or anything, and it will display that.

This is a little more advanced here, but if you have another sound and you put "John sighs" into it, if these two sounds are played, they will display two "John sighs" subtitles, so this is what the subtitle directory is for. If you are more advanced in pack-developing, read these steps.

If the subtitle name here equals something like this,
"subtitle": "subtitles.entity.sheep.hurt"It will not display "subtitles.entity.sheep.hurt" in the subtitles. Instead, it will display "Sheep hurts." How does it do that? The subtitles.entity is inside the lang folder, and under a json file named "en_us," which is standard United States English. Inside this file are the exact words "subtitles.entity.sheep.hurt," and right after it is the displayed subtitle "Sheep hurts."

Now, if you have a directory under "subtitles.entity.sheep.hurt," if you have two sheep hurting sounds, it will only display one "Sheep hurts" subtitle, instead of two.

Finding sound storages
you can browse through sounds using /playsound, there are more sound options than you think.
in vanilla minecraft, the stone breaking sound is no different than the placing sound.

you can change this, by looking it up with /playsound.
enter the command /playsound minecraft:block.stone.break @a ~ ~ ~
then, in your sounds.json file, if you want to keep the sheep sounds but add a new stone breaking sound, do this:

{
"entity.sheep.hurt": {
"sounds": [
{ "name": "mob/sheep/hurt1" },
{ "name": "mob/sheep/hurt2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.hurt"
},
"entity.sheep.death": {
"sounds": [
{ "name": "mob/sheep/death1" },
{ "name": "mob/sheep/death2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.death"
},
"entity.sheep.death": { <----[inside the directory paste the /playsound name. example: "block.stone.break"]
"sounds": [
{ "name": "mob/sheep/death1" },
{ "name": "mob/sheep/death2" }
], "replace": "true", "subtitle": "subtitles.entity.sheep.death"
}
}

now, when you break a stone block, it will sound like your sheep death sound. you can change it by the directories below.


Specific block sounds
if you're looking to add a custom sound to a specific block like diorite, polished granite, oak planks, you cannot, unfortunately through the lack of customization. spruce planks use the same sounds as oak planks, so there is not specific way for specific block sounds.
/playsound labels all the customizable, removable, and able to be added sounds.

Hidden sound storage locations
want a source of sounds? go into the actual .minecraft folder (not in your texture pack) which is outside of the resourcepacks folder, and go into assets (which is not in your texture pack i must say again) and go into indexes. open up your latest version, should be defined by the version downloaded, and inside, it looks like a bunch of spammed numbers and letters, but they are not. they actually define a few images and most sounds not included inside the legacy folder. these "spammed" numbers and letters are called "hash" data.
Copying hash data
look up whichever sound you want to find, like the amethyst block breaking sound. look this up inside the file:
minecraft/sounds/block/amethyst/break1.ogg
the bold text is what you should copy next.
you should find something that looks like this:
"minecraft/sounds/block/amethyst/break1.ogg": {"hash": "d99ea9a1bcd14d24f9a83d09fb07be81fcf30570&", "size": 33986}, now that you have the "hash" data copied, exit the indexes folder and go into the "objects" folder and paste the hash data inside the search bar. you do not need to go into specific folders.
paste the hash data into the search. it should come up with the same name as the hash data but with no defined file type.
one way to read the file is to drag it into audacity.

Datapack developing custom sounds without replacing any (this is useful for datapack developers and custom sounds)
if you are a datapack developer and you want a custom sound to play, make the sounds.json script and paste this inside it:

{
"customsound": {
"sounds": [
{ "name": "sound directory" }
], "replace": "true", "subtitle": "A custom sound"
}
}

then, in your datapack, this should be available through /playsound.
example command:
/playsound minecraft:customsound @a ~ ~ ~
boom! your custom sound just was played without replacing any current ones!

Ambiences
for more advanced sound developing, heres one example. you may think your world is too quiet, or perhaps you just want a background noise for something. the type of noise doesn't depend, which is not what we'll be focusing on right now, but rather how to direct your ambience sound and where it comes from.

now, of course, you probably have been underwater or in the nether and heard ambiences. the nether ambiences are dependent on the biome, whereas, since the overworld does not support those types of "ambiences," we have go the unofficial route.
i learned this "footstep trick" from a texture pack that used a sound pack called "xonk sounds".
so, how to do this "footstep trick" is to go into your sounds.json file and, we'll just use the grass footstep as a template, paste this script into it:
{
"block.grass.step": {
"sounds": [
{ "name": "step/grass1", "weight": 150 },
{ "name": "step/grass2", "weight": 150 },
{ "name": "step/grass3", "weight": 150 },
{ "name": "step/grass4", "weight": 150 },
{ "name": "step/grass5", "weight": 150 },
{ "name": "ambience/custom/loop", "weight": 52 },
], "replace": "true", "subtitle": "Footsteps"
}
}

so, now to make the sound. like i probably said before, you need to, if you don't already have the folder, make the sounds folder inside the minecraft folder (inside your texture pack) and make yet another folder named "custom," and then make your sound, and then export it as .ogg and then put it into the folder, and name it "loop.ogg." (adding the ending suffix ".ogg" depends if you are working in an archive, or specific settings in your documentation folder. in a winrar archive, add .ogg, and, if in the documents and every file has the file type at the end, add .ogg. if not, do not.)

Stereo & Mono sounds

Both have advantages and disadvantages.
Minecraft supports both. If you wanted a mob sound, you should make it a mono track, so you can hear which direction it comes from.

If you used stereo tracks for mob sounds, it plays the way it sounds in the sound editor - which means you can't tell which direction it is coming from. It basically sounds like it is all around you, or where you are, and this is usually not what you want.

Mono is best for directional sounds, like blocks, entities, items, etc.

Stereo is best for surrounding ambience like being underwater, or wind, crickets, etc. Mojang used stereo audio mixing for nether ambience. Stereo mixing is good for ambient sounds with reverb or echoing, because you can make the echo or reverb go from left pan to right pan.

If you used mono sounds for ambience, they will sound from the direction it was played from. Usually this is not what you want. If you add reverb to a mono track, the reverb will also play where the sound is coming from, not in the opposite direction, like true reverb. Like I said, stereo sounds have the advantage when it comes to reverb.

If you want music from a jukebox, mono is ideal so you can hear the direction in which it is playing.

Optimization

One of the most painful things about making sounds in Minecraft is the size of sounds. You may want your texture pack to cover a lot of sounds, but it to still be very lightweight. Unfortunately, the only way to do this is to reduce the quality, but you can do so without it being too noticeable. Also, if you are going to reduce the quality, always save a backup of the original quality in case if you regret it.

If you have Audacity installed, this is how you do it.

1. Import your sound into Audacity.
2. Change the export file to .ogg.
3. Before you export, change the quality to 0.

One other way to do this is to reduce the Hz. In Audacity, it should be to the left-bottom of the window. Reduce the numbers, but do not reduce it too much.


Testing
now, if you recall what we were discussing before the Stereo and Mono sounds part, if you walk around on grass for a little while, it should sound the loop file. if not, check for errors. one way to find out if your sounds.json file is even working is to change the "subtitle" to something specific, as an example, "test." if you changed it to that and it still displays "Footsteps," that indicates the file is broken, but can be fixed.

if it displays "test" in the subtitles but is not playing the loop, you have made a mistake in directing the sound. make sure to order the folders to match sounds.json's directory.

done!

Don't understand something? maybe I'm not clear enough? Feel free to ask some questions! Like I mentioned before, I'm 89% sure I know almost everything there is about Minecraft sounds.
Tags

7 Update Logs

Update #7 : by DERPWARE 06/22/2023 2:42:34 pmJun 22nd, 2023

Added new categories :

Custom Subtitles
Stereo & Mono Sounds
Optimization

making the tutorial just more clear in general.
LOAD MORE LOGS

Create an account or sign in to comment.

2
06/23/2023 6:59 am
Level 29 : Expert Miner
TheEscaper
TheEscaper's Avatar
Great post! I was just recently looking for a indepth guide on sound packs.
But I still have a few questions if you don't mind.


1. I have made a pack that replaces menu tracks and adds new ones, but i can still hear vanilla tracks play. So I made a little investigatin and found out that new biome specific tracks can play in the menu. I can just give up on it, but i still want to know: is there a way to prevent them from playing in the menu?

2. I have 12 tracks in my pack, but I noticed that not all of them play equally, first 4 especially often. There is a "weight" parameter in the sound.json file that deterimines how often a sound should play relative to other ones in a list (if i got it right). What values should I type to make a half of them to play like two times less often?

3. And the last one about sound parameters. I know there are: "weight", "volume" and "pitch". Is that it or there is more?
2
06/23/2023 11:52 amhistory
Level 65 : High Grandmaster Lumberjack
DERPWARE
DERPWARE's Avatar
Thanks!

About the menu or biome specific tracks, I believe you can remove them "officially" by the method mentioned in the blog here. I think they are accessible in the command /playsound

About the weight values, I believe it all plays equally if you set the weights at the same, or didn't even mention the weight. I don't know what your weight values are, so I can't give a specific number.

One problem might be is that you do not have "replace" added to your script. If it is false, it plays your sounds along with the vanilla sounds. If its true, it plays your audio only. It is placed like this:



"block.anvil.break": {
"sounds": [
{ "name": "sound", "volume": 1 }
], "replace": "true", "subtitle": "subtitles.block.generic.break"
}

And about the sound parameters, I think there are two more. "attenuation_distance" and "stream".
Some examples for the placement are:
"attenuation_distance": 1
"stream": false

Attenuation_distance only works with mono tracks. I'm not entirely sure what measurement this goes by, but it definitely is not by blocks.

I think "stream" makes it play everywhere in the world, but I haven't looked too much into that.
2
06/23/2023 2:14 pm
Level 29 : Expert Miner
TheEscaper
TheEscaper's Avatar
Thank you so much!

I think "replace" solved it. So far i didn't hear any vanilla track.
And i tinkered a little with "weight". Balancing it between values 10 to 20 makes the list random enough.
2
06/23/2023 6:27 pm
Level 65 : High Grandmaster Lumberjack
DERPWARE
DERPWARE's Avatar
no problem! I'm glad it helped!
02/07/2023 7:27 pm
This reply was removed by the poster or a moderator.
1
02/07/2023 7:28 pm
Level 65 : High Grandmaster Lumberjack
DERPWARE
DERPWARE's Avatar
and?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome