Minecraft Playsound Distance?

vi
- in Worlds
1

I wanted to play a specific sound for a small area. So that when players enter the area hear the sound and when they leave it no longer. I don't really care if you hear the sound louder near the command block than further away. My real problem is that you can hear the sound anywhere in the world.

Thank you in advance.

/ playsound minecraft: music_disc.11 master @a -364.00 12.45 376.40 1 1 0

Mi

I would recommend running the command directly on players in the area.

You can define selectors in more detail. Instead of @a, as you have it, you can write something like: @a [x = blah, y = blah, z = blah, dx = blah, dy = blah, dz = blah]

What that means: All players who are in the range from x, y, z to dx, dy, dz (d stands for direction) get the sound.

Example: Range is 1,1,1 to 10,10,10:

x = 1, y = 1, z = 1, dx = 9, dy = 9, dz = 9

(dx says e.g. Out "of the given x so many blocks in x direction, so 1 + 9 = 10)

Example with minus coordinates:

1,1,1 to 10, -10,10:

x = 1, y = 1, z = 1, dx = 9, dy = -11, dz = 9