Replacing sounds with a resource pack: sounds.json and the .ogg requirement
Minecraft only plays Ogg Vorbis, and a sound event is not a file. Here is the mapping file, how to add a sound instead of replacing one, and why yours is silent.
Sound replacement fails quietly more often than any other resource-pack feature, and it is nearly always one of two things: the wrong audio format, or a misunderstanding of what a sound event is.
Only Ogg Vorbis
Minecraft plays .ogg (Vorbis) and nothing else. An .mp3 or .wav renamed to .ogg will not play — the container has to actually be Ogg.
Mono versus stereo matters too: only mono files are positioned in 3D space. A stereo file plays at constant volume everywhere, which is right for music and wrong for a block sound. If your custom anvil sound seems to follow you around, it is stereo.
A sound event is a name, not a file
entity.pig.ambient is an event. It maps to a list of files, one of which is chosen at random each time. Replacing a pig sound means redefining the event, not dropping a file somewhere.
assets/minecraft/
├── sounds.json
└── sounds/custom/my_pig.ogg
{
"entity.pig.ambient": {
"replace": true,
"sounds": [ "custom/my_pig" ]
}
}
Three details:
replace: truediscards the vanilla list. Leave it out and your sound is added to
the pool, so it plays sometimes and the original plays otherwise. Both behaviours are useful; the default is add.
- Paths omit
sounds/and.ogg.custom/my_pigresolves to
assets/minecraft/sounds/custom/my_pig.ogg.
sounds.jsonsits at the assets/minecraft root, not insidesounds/.
Per-file options
"sounds": [
{ "name": "custom/my_pig", "volume": 0.8, "pitch": 1.2, "weight": 3, "stream": false }
]
weightbiases random selection within the list.stream: truefor anything over a few seconds — music and records. Non-streamed
long files are loaded fully into memory and can stall the client.
volumecannot exceed 1.0. Louder means a louder source file.
Adding a brand-new sound
Use your own namespace so nothing collides:
assets/my_pack/sounds.json
assets/my_pack/sounds/spell.ogg
{ "spell": { "sounds": ["spell"] } }
Then /playsound my_pack:spell master @a ~ ~ ~ 1 1. Custom sound events work with /playsound and in note blocks via a jukebox song definition; they do not automatically attach to any game action.
Why it is silent
- Not real Ogg Vorbis.
- Path includes
sounds/or.ogg. sounds.jsonis invalid JSON — a trailing comma kills the whole file, so every sound
in the pack goes silent, not just the new one.
- Wrong
pack_format, so the pack loads but assets are ignored.
Cheat-sheets for the pack folder structure, sound event remapping and animated textures are in the Resource Pack Reference Tools.