2

Play music infinitely with command block (HELP)

spartaNN540452's Avatar spartaNN5404521/21/19 7:08 pm
2 emeralds 1.8k 4
1/25/2019 9:01 pm
Nitrox Nova's Avatar Nitrox Nova
Hello, I know how to play your own music in MC, but couse the duration of the song it stop playing. So...I will be glad if you help me with a command to play music indefiniely. thanks.
Posted by spartaNN540452's Avatar
spartaNN540452
Level 6 : Apprentice Crafter
0

Create an account or sign in to comment.

4

3
01/25/2019 9:01 pmhistory
Level 60 : High Grandmaster Robot
Nitrox Nova
Nitrox Nova's Avatar
I really like this idea! I think I have a solution for you, if you're using java edition

To make a timer, run:
/scoreboard objectives add musictimer minecraft.custom:minecraft.play_one_minute

Then create play_song.mcfunction, and put these commands in it:
stopsound @p music
playsound minecraft:music_disc.mellohi music @p
scoreboard players set @p musictimer 0

In a command block (repeat, unconditional, always active):
execute at @a[scores={musictimer=100..}] run function music:play_song

this will stop and replay the song every 100 ticks, which is 5-6 seconds or so. Change the number to match the length of the song. In 1.14 we will get the /schedule command, which would make this easier.
3
01/25/2019 5:38 pm
Level 57 : Grandmaster Engineer
ShelLuser
ShelLuser's Avatar
Now that is an interesting question :)

I don't think this can be done using a command. See, although you have options to issue a command over and over again the downside to that is that the song you play will then restart if it was already playing. I just checked using the /data command and from what I can tell (disclaimer: I could be overlooking something) there is no property which tells if a player is listening to music or not.

Ergo: right now my conclusion is that your only liable option would be to use a mod. But that's at first glance, I added this to my (now really existing) todo list and I'll look further into it this weekend.
2
01/25/2019 6:52 pm
Level 17 : Journeyman Llama
Master_Bw3
Master_Bw3's Avatar
oh it is possible just use repeaters
1
01/25/2019 5:46 pm
Level 11 : Journeyman Mage
XENX-SMP
XENX-SMP's Avatar
Well dang, I always thought somehow that was possible Good old ShelLuser answering the big questions
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome