I couldn't find too much info on the wiki. When using the /music command, only sound events like "music.game.water" work for me, but this uses multiple tracks on a list that are randomly selected. It's posssible to use an individual track name like "hal3", "calm2", "shuniji", etc. instead of usind sound definitions, so they can play a specific track?
1 Answer
Yes and no. You can't do this normally, but there is a way to do this that involves adding a resource pack with custom definitions.
You can add custom ids for use with /music
in sounds/sound_definitions.json
. Here's an example below that I made based off the vanilla resource pack as published by Mojang.
{
"format_version": "1.20.20",
"sound_definitions": {
"adamraichu.music.shuniji": {
"__use_legacy_max_distance": "true",
"category": "music",
"max_distance": null,
"min_distance": null,
"sounds": [
{
"load_on_low_memory": true,
"name": "sounds/music/game/water/shuniji",
"stream": true,
"volume": 0.20
}
]
}
}
}
You can download a demo of this example here.
-
Hopefully a working example counts as a "reputable" source. :p Commented Nov 5 at 15:04
-
Don't forget to upvote and mark the answer as accepted if this was the solution to your problem. Commented Nov 5 at 15:50