0

I want a jukebox type thing where I have a list of buttons that when pressed, play a certain song. I can use command blocks if they are needed.

So far I have tried to use droppers to place disks into jukeboxes but I can't figure out how that really works.

1

You can accomplish this using the /playsound command. The syntax is:

/playsound <sound> <source> <player> [x] [y] [z] [volume] [pitch] [minimumVolume]

With it, you can play a record like this:

/playsound record.cat record @a

  • sound is the name of the sound event to play; here's a list.

  • source determines which slider on Music & Sound Options will affect the sound's volume.

  • player is a selector determining who the sound will be played to.

  • x y z are the coordinates of the sound's origin (louder the closer you are to it)
  • volume is how loud the sound is (over 1 has no effect for this), and how far away it can be heard from.
  • pitch is the pitch of the sound, between 0 and 2 (lower than 0.5 has no effect)
  • minimumVolume is the volume the sound plays to for anyone who's too far away to hear the sound normally.
2
  • So if I want it to play a song through the jukebox/noteblocks category, what would I put for the source? – Mattmontan Oct 8 '16 at 15:58
  • @Mattmontan The possible sources, which you can see with tab-complete, are: master ("Master Volume"), ambient ("Ambient/Environment"), block ("Blocks"), hostile ("Hostile Creatures"), music ("Music"), neutral ("Friendly Creatures"), player ("Players"), record ("Jukebox/Note Blocks"), voice ("Voice/Speech"), weather ("Weather"). The record source, as used in the example command in the answer, is for the "Jukebox/Note Blocks" category. – SirBenet Oct 8 '16 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.