1

Music loops for a map

Supamegabread 1/6/21 8:44 am
520
1/8/2021 10:30 pm
hello im making a map and im trying to find a way to make music loop in Minecraft 1.16 but I cant figure out how.
Posted by
Supamegabread
Level 36 : Artisan Toast
17

  Have something to say?

JoinSign in

10

TimeWarpDrive
01/08/2021 10:30 pm
Level 53 : Grandmaster Architect
history
put "/playsound (the music) master (something close to that anyway)" into a command block and time the redstone signal to power (with a hopper clock assumedly) when the other song ends..

Ask the players to turn music off in the sounds menu (so it doesn't conflict with your tracks)

Dunno if thats what you mean, but there ya go!
1
HoboMaggot
01/06/2021 9:05 pm
Level 55 : Grandmaster Blob
Unfortunately, the only way I can think of, is to replay the music after the original music has finished. You will need to calculate how long your piece of music plays for and hook it up to a scoreboard. After that period has ended, replay the sound.
2
Obsidixn
01/07/2021 1:37 pm
Level 1 : New Miner
This is correct, since Minecraft doesn't know when a sound ends.
2
Gamingbarn
01/07/2021 7:46 am
Level 75 : Legendary Programmer Programmer
That is the best way, but I don't use scoreboards, I use /schedule command with a datapack.
2
Supamegabread
01/07/2021 8:35 am
Level 36 : Artisan Toast
does this require the data pack?
1
Gamingbarn
01/07/2021 5:17 pm
Level 75 : Legendary Programmer Programmer
Is you use the /schedule command, yes you will need a datapack.
2
Supamegabread
01/07/2021 7:35 am
Level 36 : Artisan Toast
does this work for 1.16 and can I specify when the music starts and stops or is it just always on, I know I can stop it with /stop sound @a music/master/ambient/hostile mobs/friendly mobs/ jukebox noteblock/weather/blocks
1
HoboMaggot
01/07/2021 8:55 pm
Level 55 : Grandmaster Blob
It should work with all versions that allow you to have a timer scoreboard or /schedule, so its 1.8+
2
Supamegabread
01/08/2021 7:29 am
Level 36 : Artisan Toast
can you walk me through how to do it I would really appreciate your help. I have no experience at all using scoreboards or schedules
1
HoboMaggot
01/08/2021 9:22 pm
Level 55 : Grandmaster Blob
For scheduling:
[In the function]:
<Playsound command once>
schedule function <function the playsound command is> <music time>t replace

For scoreboard:
/scoreboard objectives add timer dummy

repeating command blocks/function:
/scoreboard players add dummy timer 1
/execute if score dummy timer matches 1 run <playsound command>
/execute if score dummy timer matches <1+music duration> run scoreboard players reset dummy
2

Welcome