#custom music disc in 1.21.5

1 messages · Page 1 of 1 (latest)

thick remnant
#

trying to get a custom crafting recipe to work but nothing is showing up

worthy patrolBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1746126317:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

thick remnant
#

my thinking is its me fillin in the jukebox_playable wrong

#

this is my current attempt

#
minecraft:justin_bieber_baby
vagrant mulch
thick remnant
#

?

vagrant mulch
#

you didn't give us the jukebox_playable song file contents nor the recipe

thick remnant
#

are u asking for it?

vagrant mulch
#

yea we need that inorder to point out where you made a mistake

thick remnant
#

ty

#

i was just assuming i made a mistake a certain place

vagrant mulch
#

we don't know without more context

thick remnant
#

i understand that

#

u could like politely ask for more info then mabe

#
{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    [
      "minecraft:pink_dye"
    ],
    [
      "minecraft:music_disc_5"
    ],
    [
      "minecraft:amethyst_shard"
    ]
  ],
  "result": {
    "id": "music_disc_5",
    "components": {
      "minecraft:custom_name": "bieber",
      "minecraft:jukebox_playable": "minecraft:\"justin_bieber_baby\""
    },
    "count": 1
  }
}
vagrant mulch
thick remnant
#

understandable

#

its hard to tell through text u know

vagrant mulch
stoic otter
#

Just saying custom music can only be played if its in a custom resource pack.
Then set jukebox_playable to your custom music file inside your resource pack and I'm pretty sure it should work.

vagrant mulch
thick remnant
#

trying it

thick remnant
#

im still not getting anything

vagrant mulch
#

take a look at your logs

haughty masonBOT
#
Logs

When making or debugging Minecraft datapacks, it is useful to have the Minecraft logs open in order to view errors quickly.

To open the logs:

  1. Enable the logs in the Minecraft Launcher (see image)
  2. Start Minecraft

The logs should open in a separate window. Datapack errors are shown in the when you /reload and are almost always in red text or yellow text.

thick remnant
#

gives an error here

#
[21:02:16] [Worker-Main-202/ERROR]: Couldn't parse data file 'new_music:custom/justin_bieber_disc' from 'new_music:recipe/custom/justin_bieber_disc.json': DataResult.Error['Failed to parse either. First: Failed to get element minecraft:justin_bieber_baby; Second: Cannot parse as key without registry missed input: {"minecraft:jukebox_playable":"minecraft:justin_bieber_baby"}': net.minecraft.class_1867@7046dd96]
#

ill upload the whole thing

thick remnant
#

man all i find is for 1.21.4 and evrey1 seems to use the old advancement way

small otter
thick remnant
#

the main issue is not being able to craft my custom recipe

#

im trying to make a custom music disc

small otter
# thick remnant

not part of the main problem but I suggest using the "stream": true option in the sounds file

thick remnant
#

how do i aply that

#

is it the json in the resourcepack?

small otter
#

like that

#

and the reason why it doesn't work for you is bcause you only added the sound and a recipe for the music disc but not the jukebox song (that's its own thing)

#

the file needs to be here: namespace:jukebox_song/<filename>.json

#

and it has to look something like this:

#

(description is the text that gets displayed when you put the disc in the jukebox)

thick remnant
#

i ahve tha

#

file

#

i remember making it

#

so it must have been mis placed

thick remnant
thick remnant
#

in the datapack or resourcepack

small otter
#

datapack

thick remnant
#

its this file i made right

#
{
    "comparator_output": 1,
    "description": "Justin Bieber - Baby",
    "length_in_seconds": 219.0,
    "sound_event": {
      "sound_id": "minecraft:justin_bieber_baby"
    }
 }
#

its in data > new_music > jukebox_song

#

is it cause the description is different?

small otter
#

in the jukebox component of the recipe you have to use the id of that file and not the sound file

#

so change minecraft:justin_bieber_baby to new_music:justin_bieber_baby

#

in the recipe

thick remnant
#

alright

#

ive seen there could be an error with the generator i use in the name of the item

#

if i want spaces in the name how would i write that

#

does this work?

#
"[{'text':'Justin Bieber - Baby','color':'dark_purple'}]"
small otter
#

idk how strict mc is with the ' and " but i know that it works with them reversed.

#

although the keys (text, color) are not in quotes since 1.21.5

thick remnant
small otter
#

songs.json

thick remnant
#

right its in songs.json but im not sure where to place it in text

small otter
#

what do you mean?

#

you already have 99% off the stuff in sons.json

thick remnant
#

could u show me the whole file

small otter
#

that won't make any sense, it's the same over and over again. Just put "stream":true where I put it in my file.

thick remnant
#

i get that if u have multiple songs there are multiple of these

small otter
#

the structure is the same

thick remnant
#

let me try

small otter
thick remnant
#
{
    "comparator_output": 1,
    "description": "Justin Bieber - Baby",
    "length_in_seconds": 219.0,
    "sound_event": {
      "sound_id": "minecraft:justin_bieber_baby"
    },
"music_disc.lore": {
"sounds": [
{
"name": "new_music:justin_bieber_baby",
"stream": true
}
]
 }
small otter
#

What?

#

We already established that the jukebox file goes in the DATApack

#

and I told you the path too

#

and it is it's own file

thick remnant
#

ok ty

small otter
#

you already had the songs.json file and the olny thing you had to do was add this single line => "stream": true

thick remnant
#

oops

#

sorry

#

im quite tire

thick remnant
small otter
#

if you have that, you need to change the id in the recipe file to that of the jukebox file.

thick remnant
#

thats the recipe file yes

#

and i have changed it according to instrusctions

#
{
  "type": "minecraft:crafting_shapeless",
  "category": "misc",
  "ingredients": [
    [
      "minecraft:pink_dye"
    ],
    [
      "minecraft:music_disc_5"
    ],
    [
      "minecraft:amethyst_shard"
    ]
  ],
  "result": {
    "id": "music_disc_5",
    "components": {
      "minecraft:lore": "[{text:'Justin Bieber - Baby'}]",
      "minecraft:jukebox_playable": "new_music:justin_bieber_baby"
    },
    "count": 1
  }
}
#

as u can see

#
"minecraft:jukebox_playable": "new_music:justin_bieber_baby"
small otter
#

should work now

thick remnant
#

not getting an output on the right ingreidince

#

oh u meant the sounds file

#

for the stream addtion

#
{
"music_disc.justin_bieber_baby": {
    "sounds": [
        {
        "name": "records/justin_bieber_baby",
        "stream": true
        }
    ]
}
}
#

my new sounds.json

#

hm

#

still no cigar

#

cya tommorow

thick remnant
#

does the current example pack have a recipe with components?

thick remnant
#

recipe is working after simplefying it

#

but the music disc wont play the song when put in

thick remnant
#

fixed it

#

apparently i have to do this

#
"sound_id": "minecraft:music_disc.<music_disc_sound_name>"
#

instead of just

minecraft:<music_disc_sound_name>