- 6,119 views, 29 today
- 21
- 11
- 15
351
![How to direct, replace and add sounds in Minecraft | Learn Everything about Sounds](https://cdn.statically.io/img/static.planetminecraft.com/files/image/minecraft/texture-pack/2024/380/17860925-pack-copy-copy_xl.webp)
![Derpswen Minecraft Texture Pack](https://cdn.statically.io/img/static.planetminecraft.com/files/image/minecraft/texture-pack/2024/746/17823369-bar-vines-big_xl.webp)
Introduction
greetings, I'm Derpware, you may know me from my texture packs, and this is a blog post that goes over I believe almost everything about sounds in Minecraft. the blog post's been written over the course of a year or two, so there may be inconsistencies in my writing style and/or some things might be unclear or unorganized. I'll begin with sound addition. NOTE: the comments are a good source of help too
Adding Sounds
If any texture pack beginner is viewing this and thinks this is another one of those "how to make custom sounds!" blogs, it is not. if you're is frustrated by the fact that, as I used to think, you can only replace existing 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, which were 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'll 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 bleating sounds, I could not do that without sounds.json. So what I do is make this file, and put this code 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
notice: even if you do not contain the actual sound file (in this case, death1.ogg and death2.ogg) it will not break the sound file, but leastwise just play no sound, and not even show a subtitle. however, it does shoot an error in the game log saying that it cannot find the sound requested.
since this script is finished, now we must make the sounds. if you do not have a folder (not a file) named sounds, make one inside the minecraft folder in your resoruce 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 it's for making 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" in the script it would direct it to "sounds/sounds/mob/sheep/death," and we don't want that, because there's 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. take your time making it, or make it a test if you want to.
once you're done doing that, export that sound as .ogg, 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 CUSTOM sound.
do these with the other sounds defined in sounds.json.
Adding more variations
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" }, <---[this one has a comma, this is the beginning string, the original]
{ "name": "mob/sheep/hurt2" } <---[add a comma, this is a new string (that's why it's purple)]
{ "name": "mob/sheep/hurt3" }, <---[remove comma, this is a new string (that's why it's purple)]
], "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 game 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 subtitle.
this method makes each of those "John sighs" subtitles unique, so if there is another sound that has "John sighs" as its own unique subtitle, when both sounds are played at once, two "John sighs" will appear on top of each other in the subtitles. obviously, you probably don't want that. fortunately, there is a remedy for this.
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 in your resource pack, and in the folder, there under the .json format is a file named "en_us," which is standard United States English. this file contains all the necessary vanilla texts that you see during gameplay, including subtitles. if you search "subtitles.entity.sheep.hurt," in this file. you will encounter that string. right after it is the displayed subtitle "Sheep hurts." if you wish to modify this subtitle, it will modify all sounds directed to "subtitles.entity.sheep.hurt".
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. sounds mighty complicated, eh? well, to be honest, it isn't that hard to think about. I'm just simply not that good at explaining
Custom sound directory example
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. placing sounds are not affected
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. there are files for every version. open up your latest version, should be defined by the version downloaded, and inside, it looks like a bunch of spammed numbers and letters that have meaning. 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!
Ambients
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.
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 }, <---[This is the line that creates ambience. the higher weight, the more it will play.]
], "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.
![Derpswen Minecraft Texture Pack](https://cdn.statically.io/img/static.planetminecraft.com/files/image/minecraft/texture-pack/2024/746/17823368-bar-big_xl.webp)
Tags |
8 Update Logs
Update #8 : by DERPWARE 06/07/2024 9:21:35 pmJun 7th
did a bit of changes with how it looks so far, and I made some text more clear and illustrated the code better
LOAD MORE LOGS
5711241
6
Create an account or sign in to comment.
you'd have to make a resource pack. now mind you, I read that you want people to not have to do anything once they download it, much less install a resource pack. but if you do choose this option, which is the only way to implement custom music, this is how you'd do that.
create a file under assets > minecraft named sounds.json, and paste this into it:
{
then, you need to implement your sound. create a sounds folder inside of assets > minecraft, and inside of the sounds folder create a folder named world. then, create a .ogg sound file (best made with Audacity) as your music. then, put that file under world and name it music.ogg."block.grass.step": {
"sounds": [
{ "name": "world/music" }
], "replace": "true", "subtitle": "Music plays"
}
}
now, in-game try the command /playsound minecraft:world.music. if it doesn't come up this way, try other methods
this is a method made so you don't have to replace any existing sounds in the game, but rather add as many as you want
also maybe next time READ the blog post, I covered this already
in this case, even if you could somehow put a custom sound to an optifine variant, the sounds.json file doesn't have any connections with optifine, especially ipattern. if you were going to modify an entity's sound for a specific skin, it'd have to be supported by optifine itself so it could recognize the variant itself under a certain optifine-supported condition