How Custom Music Discs Work
A functioning music disc requires four separate pieces across both your Behavior Pack and Resource Pack. First, the Behavior Pack defines the custom item itself and gives it the record component, which tells the game that jukeboxes should accept it. This component also dictates which sound event the jukebox will trigger and what redstone signal strength a comparator reading the jukebox will output.
On the Resource Pack side, you need the actual audio file, a sound definition that links the Behavior Pack's sound event identifier to that audio file, an item texture so the disc is visible in the inventory, and localization entries so the item displays a proper title and artist description. Because music tracks are much longer than standard sound effects, the Resource Pack must be configured to stream the audio from the disk rather than loading the entire file into memory at once.
Defining the Disc Item
Start by creating the item file in your Behavior Pack. The critical piece here is the `minecraft:record` component. Without it, clicking a jukebox with the item will simply do nothing. Alongside it, you should set `minecraft:max_stack_size` to 1 so your disc does not stack, matching the behavior of vanilla discs.
The `sound_event` string inside `minecraft:record` is the identifier you will use in your Resource Pack's sound definitions. While older versions of Bedrock only allowed you to overwrite vanilla record sound events here, modern versions allow custom string identifiers.
| Field | What it does | Notes |
|---|---|---|
| sound_event | The sound event identifier triggered when the disc is inserted into a jukebox. | Must match the key in RP/sounds/sound_definitions.json. |
| duration | Length of the track in seconds. | Controls when the jukebox stops emitting music particles and resets internally. |
| comparator_signal | Redstone power level output by a comparator attached to the jukebox. | Accepts an integer from 1 to 15. |
{
"format_version": "1.20.50",
"minecraft:item": {
"description": {
"identifier": "my_pack:forest_lullaby_disc",
"menu_category": {
"category": "items",
"group": "itemGroup.name.record"
}
},
"components": {
"minecraft:max_stack_size": 1,
"minecraft:icon": {
"texture": "forest_lullaby_disc"
},
"minecraft:record": {
"sound_event": "record.forest_lullaby",
"duration": 145.0,
"comparator_signal": 13
}
}
}
}Preparing the Audio File
Minecraft Bedrock requires audio files to be encoded as Vorbis `.ogg` files. Simply renaming an `.mp3` or `.wav` file to `.ogg` will not work; the file must be genuinely exported or converted using an audio editor like Audacity or a command-line tool like FFmpeg. Place your converted file inside the `RP/sounds/` directory, such as `RP/sounds/music/forest_lullaby.ogg`.
If you want your music disc to fade out as the player walks away from the jukebox, your `.ogg` file must be exported as a single-channel (mono) track. Minecraft's 3D positional audio engine cannot spatialize stereo files. If you use a two-channel (stereo) file, the music will play at full, flat volume everywhere in the world regardless of how far the player travels from the jukebox, until they unload the chunk.
Registering the Sound Definition
Once your audio file is in place, you must map the `sound_event` name from your item to the actual file path inside `RP/sounds/sound_definitions.json`. Notice that the file path inside the JSON does not include the `.ogg` file extension.
For music discs, you must set `stream` to `true`. If you leave this out, the game attempts to decompress and load the entire song into RAM at once, which causes severe lag spikes when the disc starts or causes the sound engine to silently drop the track altogether. Setting `max_distance` to `64.0` matches the audible range of a vanilla jukebox.
{
"format_version": "1.14.0",
"sound_definitions": {
"record.forest_lullaby": {
"category": "record",
"max_distance": 64.0,
"sounds": [
{
"name": "sounds/music/forest_lullaby",
"stream": true,
"volume": 1.0,
"load_on_low_memory": true
}
]
}
}
}Item Texture and Localization
Place a 16x16 PNG image for your disc in `RP/textures/items/forest_lullaby_disc.png`, and register the short name `forest_lullaby_disc` inside `RP/textures/item_texture.json` so it matches the `minecraft:icon` component in your Behavior Pack.
To make your item look like a genuine music disc in the inventory, you need to set both its item name and its record description in your language file. Vanilla discs are all named "Music Disc" and show the composer and track title in a grey subtitle underneath. The `minecraft:record` component automatically looks for a localization key built from the `sound_event` name to generate this subtitle and the actionbar text that pops up when you insert the disc.
item.my_pack:forest_lullaby_disc.name=Music Disc
item.record.forest_lullaby.desc=Composer Name - Forest LullabyWhich versions this applies to
Applies to Minecraft Bedrock 1.20.50 and newer using stable item JSON formats. No experimental toggles are required.
When it does not work
| What you see | Why | The fix |
|---|---|---|
| The disc can be heard at full volume everywhere in the world, even hundreds of blocks away from the jukebox. | The .ogg audio file was exported in stereo (two channels). Bedrock's sound engine only applies distance attenuation to mono (single-channel) audio files. | Open your audio file in an audio editor, mix the stereo tracks down to a single mono track, and re-export the .ogg file. |
| The disc goes into the jukebox and the title pops up above the hotbar, but no music plays. | Either the file is a renamed .mp3 rather than a true Vorbis .ogg file, the file path in sound_definitions.json accidentally includes the .ogg extension, or 'stream' was not set to true for a long audio track. | Remove '.ogg' from the 'name' field in sound_definitions.json, verify 'stream': true is present, and ensure the file was properly converted using Vorbis encoding. |
| Content Log error: [Item][error]-my_pack:forest_lullaby_disc | minecraft:record - sound_event is not a valid SoundEvent | In older item format versions (prior to 1.20.x), the minecraft:record component strictly validated sound_event against a hardcoded list of vanilla record names (such as record.13 or record.cat) and rejected custom strings. | Update the format_version at the top of your Behavior Pack item JSON to 1.20.50 or newer, and ensure your minecraft:icon syntax matches the modern format. |
Reference, straight from the game files
Read out of the game itself, so the ids match the version you are building for.
