Minecraft Data Packs / Tool

Record API [Datapack Edition]

  • check_circle Functions
  • check_circle Loot Tables
  • 2,996 views, 4 today
  • 148 downloads, 0 today
  • 24
  • 15
  • 8
legopitstop's Avatar legopitstop
Level 76 : Legendary Programmer
267
Record API [Datapack Edition] Minecraft Data Pack Record API [Datapack Edition] Minecraft Data Pack Record API [Datapack Edition] Minecraft Data Pack

This datapack and resroucepack lets you easily add your own custom music discs to vanilla Minecraft! This API also includes a dynamic way to obtain the discs. The downloaded zip contains the API resources and data. It also contains an example pack that you are free to reference to create your own pack.

Get 25% off your first server!
Click on the above image, select plan (at least 4GB), use code legopitstop to get 25% off your first month and enjoy playing with your friends!

Features

  • Easily add an unlimited (6500 total) number of music discs! That's a lot!
  • Lag friendly! This pack was built with server-side performance in mind so no worries about sacrificing performance.
  • Doesn't replace any already existing discs!
  • Download the Music Disc Creator [​Coming Soon] app to create your own music disc pack using this API without having any coding knowledge! COMING SOON!

Dependent packs


Other packs that use this API, If you create a pack that uses this API feel free to drop a comment below.

Example Pack


The downloaded API zip contains an example datapack and resource pack. This example adds one custom disc.


Obtain


The custom disc has a chance to drop (along with all vanilla discs) when a Skeleton shoot and kills a Creeper.

With cheats, you can run the below command to obtain the item.
/function example:music_disc_5

Distributing

Your Pack


You are free to distribute your custom pack under the following terms;
  • Your pack must not contain this API pack, your users must download the API from this page.
  • If your pack contains copyrighted music Legopitstop is not responsible for any consequences for disturbing this music.
  • You must add the following to your pack (submission description)<username> is not affiliated with Legopitstop

This Pack


Note that this pack is licensed under Legopitstop's Common License v2 which prohibits the distribution of this API pack.
  • If you plan on sharing your custom pack you must have your users download the API from this page!
CompatibilityMinecraft 1.18
toMinecraft 1.19
Tags

2 Update Logs

v1.2.0 : by legopitstop 08/21/2023 3:39:37 pmAug 21st, 2023

[1.2.0]

General

  • - Updated for 1.20.2 (Snapshot 23w23a)
  • - Added support for Music Disc Relic
  • - Otherside and Pigstep will no longer drop from a creeper.
  • - Updated API. Read the docs for more.
  • - Vanilla sound should now be stopped.

Known Issues

The following can't be fixed due to them being hard-coded into the game. [Jukebox Duration NBT data](feedback.minecraft.net/hc/en-us/community/posts/18734778809741)
  • - Disc will keep displaying particles even when the track is over.
  • - Disc will not eject into hopper even when the track is over.
LOAD MORE LOGS

Create an account or sign in to comment.

1
05/18/2023 11:41 am
Level 1 : New Miner
User4594238G
User4594238G's Avatar
I encountered 2 issues with the API that I was unable to fix myself:



- Sometimes the vanilla music isn't stopped when a custom music disc is played. There seems to be a strange race condition between minecraft vanilla tick that plays the vanilla music disc and the custom function that stops the sound. It seems sometimes the vanilla sound is called to be stopped, before the normal music disc sound is played by minecraft itself. I was unable to get this result consistently (which is why I think it might be race condition)



- When using the datapack on a multiplayer server and multiple people are playing a custom disc in different jukeboxes (at different locations, which can be arbitrarily far away) all jukebox sounds are stopped when one of the songs ends or the disc is removed. This could be fixed by having each marker on a jukebox be unique, but I am not sure how to do this.



Just wanted to let you know if you weren't aware :)
1
05/18/2023 10:24 am
Level 1 : New Miner
EHXTheAdventurer
EHXTheAdventurer's Avatar
This is the second time I see a datapack that's designed to streamline the creation of custom music discs. Neither seemed quite aware that adding custom music discs without overwriting any is very possible in Vanilla, just quite a bit more convoluted.
05/18/2023 9:07 am
This reply was removed by the poster or a moderator.
1
05/18/2023 10:25 amhistory
Level 1 : New Miner
EHXTheAdventurer
EHXTheAdventurer's Avatar
That's because disc 5 isn't meant to be gotten from Creepers. Assign your Creeper-obtained discs to other discs instead, or do the whole setup yourself instead of having a library do it for you.
1
05/18/2023 11:33 am
Level 1 : New Miner
User4594238G
User4594238G's Avatar
Pigstep and otherside are on that list too, they aren't "meant to be gotten" from creepers either. 5 was missing from this list as the author seemed to intend to add all music discs to that list, but perhaps forgot to add it in the new update that supports music disc 5.



I removed my previous comment in favor of this rephrasing. The list is located here in the API datapack:

data/record/tags/functions/creeper.json
1
05/18/2023 9:03 amhistory
Level 1 : New Miner
User4594238G
User4594238G's Avatar
I had a few issues that I ran into, here are my fixes for them:



If you run this on a server, make sure command blocks are enabled in your server.properties file!


If you encounter an issue where music discs infinitely drop from when a creeper dies from a skeleton do the following:
In the record api datapack, add this line to main_tick (position doesnt matter):
kill @e[​type=item,nbt={Item:{id:"minecraft:paper",tag:{DropCreeperDisc:1b}}}]
This will destroy the paper at which every tick all records are spawned.

Additionally, if you do not wish to have the music discs 5, otherside and pigstep added to the loot pool of creeper music drops do the following in the Record API datapack:
- Remove music_disc_5.mcfunction from data/record/functions/minecraft
- Remove music_disc_pigstep.mcfunction from data/record/functions/minecraft
- Remove music_disc_otherside.mcfunction from data/record/functions/minecraft
- Remove the lines "record:minecraft/music_disc_pigstep" and "record:minecraft/music_disc_otherside" from data/record/tags/functions/creeper.json




(this will likely mess with custom music discs made for these particular discs so avoid them to be safe, untested)



Tested and working for 1.19.4


Enjoy your music!
1
07/05/2022 8:29 am
Level 1 : New Miner
Walker5507
Walker5507's Avatar
Hi, I am currently having some problems with the creepers not actually dropping the discs. I have added all the discs to the creeper tag in the record folder but it still doesn't work. I am however receiving the paper with the DropCreeprDisc tag.
1
05/27/2022 4:06 pm
Level 28 : Expert Modder
osfanbuff63
osfanbuff63's Avatar
How did you add an update checker?
2
05/31/2022 1:58 pm
Level 76 : Legendary Programmer
legopitstop
legopitstop's Avatar
It's an external website that will show you when your version is out of date, Then provide a download button on the homepage if it's out of date. You can find the update checker URL generator here: https://legopitstop.github.io/Update_Checker/update-checker-generator.html

Here's an example of the JSONURL: https://raw.githubusercontent.com/legopitstop/Record_API/main/update.json



Read more via the README in the repo: https://github.com/legopitstop/Update_Checker#readme
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome