Minecraft Data Packs / Quality of Life

🎡 Custom Music Disc Framework 🎡

    • 9,345 views, 9 today
    • 1,129 downloads, 2 today
    • 35
    • 24
    • 19
    Bertiecrafter's Avatar Bertiecrafter
    Retired Moderator
    Level 70 : Legendary Engineer
    773

    This data pack allows you to play custom music discs!


    Previously, you could only overwrite existing music discs with your own music and since everyone is overwriting the same disc, you could only ever have 1 custom track. Well, those times are over.

    This page describes playing custom music discs. Read this tutorial blog post if you want to create your own discs.

    How does it work?
    A step by step guide to playing music discs will follow, but here's an overview. When you insert a music disc, Minecraft internally finds the related sound and plays it. This framework does the same, but allows you to redefine the sound that belongs to each music disc item.

    For each music disc you'll have to install an additional data pack and resource pack. During the creation of a custom music disc, the framework writes information from the data pack to the disc. Then when the custom music disc is played, the framework uses that information to play the sound file in the resource pack.

    Playing custom music, step by step:
    1. Download this submission and unzip it. Install the "Framework" .zip file inside as a data pack in your world. (?)
    2. Downloading and install a music disc data pack + resource pack. (?) You'll find an example data pack and resource pack in the submission download. Creators are free to post links to their custom discs in the comments below.
    3. Reload the world using /reload and enable any music disc resource packs in the Minecraft menu.
    4. Drop a redstone block on a jukebox to upgrade it and allow the framework to track it.
    5. Get yourself a book and quill and write a track code on the first page. Track codes are provided by the creators of the custom disc packs. Check the list below for already available track codes. Note that the track code is case sensitive and do not add any enters or spaces after the code.
    6. Now we need to use the track code to obtain the custom music disc. Insert a disc into the upgraded jukebox and drop the book and quill (without signing it) and a diamond on top.
      • The jukebox will start writing data to the disc and smoke will appear, this takes time (15 seconds).
      • The process can be cancelled by taking out the disc. You'll get your diamond and book and quill back.
      • After writing, the diamond will be consumed, the book and quill will pop out and the new disc will be in the jukebox waiting for you to pick it up. If the track code did not match anything, you'll get a broken disc.
      • Custom discs (broken or not) can be re-written with a different track code.
    7. Congrats, you got yourself a custom disc! Now you can insert it into an upgraded jukebox to play it. It won't work on jukeboxes that you did not add a redstone block to.
    8. Taking out a custom music disc does not automatically stop the music. To stop hearing a custom track, use "/trigger stop_jukebox". This will stop all currently playing sounds from jukeboxes and noteblocks.
    Included track codes
    After installing the framework and optionally the example data pack and resource pack, several track codes are available:
    # Track code that is available after installing the example data pack + resource pack, copy literally:
    your username - title

    # Other track codes in the framework:
    C418 - 13
    C418 - cat
    C418 - blocks
    C418 - chirp
    C418 - far
    C418 - mall
    C418 - mellohi
    C418 - stal
    C418 - strad
    C418 - ward
    C418 - 11
    C418 - wait
    Lena Raine - Pigstep

    Enjoy! =)



    Special (!) Install Instructions
    This submission needs to be downloaded and then unzipped. Inside are 3 separate packs. The framework data pack contains all core functions, but it doesn't contain any custom music. Download compatible music disc data/resource packs or use the example data pack and resource pack. For each set of custom music discs, you need both the provided data pack and resource pack.

    General data pack install instructions:
    Simply drop the downloaded zip file in the "datapacks" folder of your world save (<world>/datapacks).
    Then open your world and do
    /reload

    In case the datapack doesn't automatically get enabled, run:
    /datapack enable "file/[​datapack folder name].zip"

    Does this work on version x.x.x?
    I don't know, unfortunately I can't check all of my submissions on each version out there. Have a look at the bottom of the submission for the known compatible versions. You're free to try the data pack in versions that are not specified with the risk of it not working. If it does work, let me know in the comments so I can adjust the listed known compatible versions.

    I encountered a bug! What do I do now?

    I test all my creations, but bugs happen no matter how long you test something. Whenever someone experiences a bug, I do my best to fix the issue. You can help me by providing any useful information. You can never give me enough information, but please send it in a DM instead of placing it in the comments. You can still place a one-liner in the comments stating the issue to make the community aware, but that alone isn't enough to help me fix the issue.
    • Checklist: Are you using the right version? Did you do /reload after dropping the datapack in? After /reload, does the datapack show up green in /datapack list?
    • What is the issue? Does the datapack not seem to be working at all or is there a specific feature you are having issues with?
    • What happened? Please give me all the steps needed to reproduce the issue. The faster I can experience it, the faster I can solve it.
    • What did you expect to happen instead? This helps me understand your point of view and determine if the issue described is actually the issue I need to fix. The bug you are experiencing could just be a side effect of something else that doesn't behave as expected.

    🎡 Custom Music Disc Framework 🎡 Minecraft Data Pack
    🎡 Custom Music Disc Framework 🎡 Minecraft Data Pack
    CreditThank you TomConn for sparking the idea :P
    CompatibilityMinecraft 1.17
    toMinecraft 1.20
    Tags

    Create an account or sign in to comment.

    1
    08/31/2021 3:12 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    Hey, I've got trouble implementing my own music. I successfully installed and implemented datapack into my world as well as the resourcepack and I played the example song. However it is unclear to me which parts I'm supposed to replace and where in order to add my songs.

    Could you possibly record a video showing how it should be done?
    1
    09/02/2021 2:00 pmhistory
    Level 70 : Legendary Engineer
    Bertiecrafter
    Bertiecrafter's Avatar
    I'm glad you got it to work! (Also in regards to your other comment.) Feel free to share a link to the submission in case you upload the data pack + resource pack combo (only upload if you made the music).
    2
    09/02/2021 6:51 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    I didn't make the music I was just messing around but the datapack is great anyways keep up the good work!
    I'm currently working on my own simple datapack too but I can't get a grasp on how this stuff works so just the fact you created this is super impressive
    1
    08/31/2021 4:33 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    Took me about 2 hours but finally I figured stuff out. I've noticed a but where if you use apostrophe in label in register.mcfunction it gets bugged out.

    For example I used song Snail's House - Lullaby (Synthion Remix) for personal use.
    When I typed "Snail's" in the label it all got red after writing an apostrophe.

    That's just a small detail other than that this datapack is great!
    1
    09/02/2021 2:01 pm
    Level 70 : Legendary Engineer
    Bertiecrafter
    Bertiecrafter's Avatar
    Yeah that's a property of JSON, you need to use a backslash to prevent it from being seen as the end of the value. (E.g. Snail\'s House - Lullaby)
    1
    09/02/2021 6:49 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    Very useful hint! :>
    1
    08/31/2021 5:04 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    The datapack seems not to be working on multiplayer. I've copied the files to my server and everything works fine but the discs don't get enchanted? When I put them into the jukebox music doesn't play.
    1
    09/02/2021 2:02 pm
    Level 70 : Legendary Engineer
    Bertiecrafter
    Bertiecrafter's Avatar
    Make sure you're on a vanilla server with the right version. Use /datapack list to see if the data pack gets loaded in. Also make sure to do /reload after installing.
    1
    09/02/2021 6:50 pm
    Level 1 : New Miner
    DuszekBoo
    DuszekBoo's Avatar
    So you reckon it will not run on spigot servers will it?
    1
    09/03/2021 11:17 am
    Level 70 : Legendary Engineer
    Bertiecrafter
    Bertiecrafter's Avatar
    Probably not. You could try /minecraft:reload but if it (or some part of it) doesn't work, you're out of luck.
    Planet Minecraft

    Website

    © 2010 - 2024
    www.planetminecraft.com

    Welcome