Jukebox song definition

Jump to navigation Jump to search
This feature is exclusive to Java Edition.
 

A jukebox song is a song played when an item with the minecraft:jukebox_playable item data component is inserted into a jukebox. Jukebox songs can be defined using JSON files in a data pack at the path data/<namespace>/jukebox_song/.

JSON format[edit | edit source]

Jukebox songs are defined using the following format:

  • [NBT Compound / JSON Object] The root object.
    • [String][NBT Compound / JSON Object] sound_event: One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) — The sound event to play when the item is inserted in a jukebox. Note that only vanilla Minecraft sound events can be referenced directly by [String] ID; custom sound events must be specified in [NBT Compound / JSON Object] object form.
    • [String][NBT Compound / JSON Object] description: A text component to display in the tooltip of the item.
    • [Float] length_in_seconds: The length of the song in seconds. Determines the length of the redstone output of the jukebox. If the sound is longer, it is cut off after this time.
    • [Int] comparator_output: Value between 0 and 15 — The redstone power output by a comparator when placed next to a jukebox playing this song.

History[edit | edit source]

[hide]Java Edition
1.2124w21aAdded jukebox songs to data packs.

Navigation[edit | edit source]