Writing a Sounds.json File — A Quick Guide
Understanding the `sounds.json` File
The `sounds.json` file is a fundamental component for customizing audio experiences within Minecraft. It serves as a central registry within a resource pack, allowing creators to define new sound events or modify existing ones by linking them to specific audio files and configuring their playback properties. For Java Edition, this file is named `sounds.json`, while Bedrock Edition utilizes both `sounds.json` and `sound_definitions.json` for similar purposes. Ultimately, this file instructs the game on which sound files to play when a particular in-game action or condition is met.
![]()
- Sound Events are the core triggers within `sounds.json`. These are unique, named identifiers, such as `entity.enderman.stare`, that correspond to specific actions or states in the game. When such an event occurs, the game consults `sounds.json` to determine which audio to play.
- Sound Categories provide a structured way to group different types of sounds. Examples include `master` for overall volume, `block` for block-related sounds, and `player` for sounds originating from players. These categories are crucial because they enable players to adjust the volume of various sound groups independently through the in-game settings, offering a customizable audio experience.
- Sound Objects are the individual definitions for the actual audio files. Each sound object specifies the path to an audio file and can include optional metadata that dictates how that sound should be played. This metadata allows for fine-tuning aspects like volume, pitch, and playback behavior.
- Minecraft Java Edition primarily supports audio files in the `.ogg` format. For Bedrock Edition, the supported formats are more varied, including `.wav` and `.fsb` in addition to `.ogg`. It is vital to use the correct file format to ensure your custom sounds function as intended.
- For sounds to properly attenuate, meaning to get quieter as the player moves further away from their source, in Java Edition, the corresponding `.ogg` file must be mono. Stereo sound files will be played globally, without positional attenuation, which is generally undesirable for environmental or entity-specific sounds.
Step-by-Step Guide to Writing `sounds.json`
Creating a functional `sounds.json` file involves a series of structured steps, ensuring that your custom sounds are correctly integrated into Minecraft.
- Create a Resource Pack: The first step is to establish a basic resource pack folder structure. This typically involves a root folder, a `pack.mcmeta` file, and an `assets` folder. Your `sounds.json` and audio files will reside within this structure.
- Set up Sound Directory: Within your resource pack’s `assets` folder, you’ll need to create a namespace folder (e.g., `assets/your_namespace/`). Inside this namespace folder, create a `sounds` directory. You can further organize your audio files by creating subfolders within `sounds`, such as `assets/your_namespace/sounds/custom/`, to maintain a clean and manageable structure for your custom audio files.
- Add Sound Files: Place your prepared audio files into the appropriate subfolders you created within your resource pack’s `sounds` directory. Remember that for Java Edition, these files should primarily be in the `.ogg` format, while Bedrock Edition also supports `.wav` and `.fsb`.
- Create `sounds.json`: Next, create the `sounds.json` file itself. For custom sounds in Java Edition, this file is typically placed in `assets/your_namespace/sounds.json`. If you are modifying vanilla sounds, it would be located at `assets/minecraft/sounds.json` within your resource pack. For Bedrock Edition, you would create `sounds.json` and `sound_definitions.json` in their respective locations within the resource pack.
- Define Sound Events: Open your newly created `sounds.json` file. Inside, you will define your sound events. Each event is a JSON object identified by a unique key, for example, `”custom.mysound”`. This key is what you will reference in commands or what the game will look for during specific triggers.
- Specify Sound Properties: Within each sound event definition, you’ll specify various properties that control the sound’s behavior:
- `”subtitle”`: This property takes a string value (e.g., `”A custom sound plays”`). This text will be displayed on-screen when subtitles are enabled in the game settings, providing an auditory cue for players who are deaf or hard of hearing, or simply prefer visual indicators.
- `”sounds”`: This is a crucial property, taking an array of one or more sound objects. Each sound object points to an actual audio file. The path is specified using the `”name”` property, formatted as `your_namespace:path/to/mysoundfile`. Crucially, you must omit the `.ogg` (or other file extension) when referencing the sound file here.
- Optional properties for individual sound objects include:
- `”volume”`: A floating-point number between `0.0` and `1.0` (though custom resource packs can push these values higher) that controls the loudness of the sound.
- `”pitch”`: A floating-point number, typically between `0.0` and `2.0`, that alters the pitch of the sound. A value of `1.0` is normal pitch, `0.5` is lower, and `1.5` is higher.
- `”weight”`: Used when you have multiple sound objects in the `”sounds”` array. This integer property dictates the likelihood of a specific sound being chosen from the array, allowing for random variations.
- `”stream”: true`: This boolean property is particularly useful for longer audio files, such as background music. Setting it to `true` prevents the entire sound file from being loaded into memory at once, instead streaming it as it plays. This can significantly reduce memory usage for lengthy audio tracks.
- Replace Vanilla Sounds (Optional): If your intention is for your custom sound to completely override an existing default Minecraft sound event, you must include `”replace”: true` within your sound event definition. Without this property, your custom sound might play alongside the vanilla sound rather than replacing it.
- Activate and Test: After saving your `sounds.json` file and your audio files, activate your resource pack in Minecraft through the resource pack menu. To test your new sounds, you can use the `/playsound` command (e.g., `/playsound custom.mysound @p`) or trigger the associated in-game event that your sound is tied to.
Important Tips for Sound Customization
Adhering to these tips will help ensure a smooth and effective sound customization process:
- Omit `.ogg` Extension: This is a frequently overlooked detail. When you specify the `”name”` of your sound file within `sounds.json`, always remember to exclude the file extension, regardless of whether it’s `.ogg`, `.wav`, or `.fsb`. The game handles the extension automatically.
- JSON Syntax: The `sounds.json` file must strictly adhere to valid JSON syntax. Even a minor error, such as a misplaced comma, an unclosed bracket, or incorrect quotation marks, can render the entire file unreadable by the game, preventing any of your custom sounds from loading. Utilize an online JSON validator to check your file for errors before testing in-game.
- Client Restart: For new sound definitions to be fully recognized by Minecraft, especially when working with Bedrock Edition’s `sound_definitions.json`, a complete restart of the Minecraft client is often necessary. A simple resource pack reload might not suffice for all changes to take effect.
- Sound Variety: To prevent sounds from becoming repetitive and to add a layer of realism or interest, define an array of multiple sound files for a single event. The game will then randomly select one of these files to play each time the event is triggered, introducing natural variation.
- Streaming for Music: For any audio file that is particularly long, such as custom background music or extended ambient tracks, always set `”stream”: true` in its sound object properties. This optimizes memory usage by streaming the audio from disk rather than loading the entire file into RAM, which is crucial for performance.
- Mono for Attenuation: In Java Edition, if you intend for your sound files to have positional audio and attenuate (fade out) with distance, ensure that your `.ogg` files are recorded or converted to mono (single channel). Stereo files will bypass positional attenuation and play at full volume globally around the player.
Common Mistakes to Avoid
Being aware of common pitfalls can save significant time and frustration when working with `sounds.json`:
- Incorrect File Paths: One of the most frequent issues is misplacing your `sounds.json` file or your actual sound files within the resource pack structure, or incorrectly referencing their paths in the JSON. Double-check your folder structure and the `”name”` property in your sound objects. An incorrect path will simply result in the sound not playing.
- JSON Syntax Errors: As previously mentioned, JSON is strict. A single missing quote, an extra comma, or an unclosed brace can corrupt the entire file. Always validate your JSON to catch these errors early.
- Forgetting `replace: true`: If your goal is to completely override a vanilla Minecraft sound event with your custom audio, but you neglect to include `”replace”: true”` in your sound event definition, your custom sound may be added *in addition* to the default sound, rather than replacing it, leading to unintended sound layering.
- Using Unsupported Audio Formats: Attempting to use audio formats not supported by Minecraft, such as `.mp3` for Java Edition, will result in the sound failing to play. Always ensure your audio files are in the correct format for your target Minecraft edition.
- Not Restarting the Game: While a resource pack reload can sometimes apply changes, particularly for textures, `sounds.json` changes, especially new definitions or complex modifications, often require a full Minecraft client restart to be properly registered and loaded by the game.
- Stereo Files for Positional Audio (Java): Using stereo `.ogg` files for sounds that are meant to be heard from a specific location (e.g., entity sounds, block sounds) will cause them to be heard globally at the player’s location, without any positional falloff. This can break immersion and create an unrealistic audio experience. Always use mono files for such sounds in Java Edition.