How to make a music follows an entity please ?

Started by TrueMath2809 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a music follows an entity please ?

I am making a boss Anzu (a type of demon) and I would like to make the music follows him because the boss moves a lot so I only have 2 options :

- Making the music follows the boss
- Limiting the arena to a X blocks wide arena and then I would need to know how to play a song at maximum volume in an arena...

I already know how to make the song start and end when the boss apear and dies.

 

Thanks by advance ! :)

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Idk if it has changed in…
Tue, 07/25/2023 - 12:35

Idk if it has changed in recent versions, since i'm stuck in 2021.1, but as far as i know, setting the "level" of the playsound block makes the audio not fade away from being away from the source. Never tested it tho

Give it a try, just in case resolves your problem. Just keep in mind that the sound buffer of minecraft could stop the boss music if there's a lot of sounds on the scene. Or at least that's a recurrent problem on my custom mods

 

Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but as far as i know,…
Tue, 07/25/2023 - 12:37

but as far as i know, setting the "level" of the playsound block makes the audio not fade away from being away from the source

Small correction: *Setting it at 100 or near that number seems to make the audio audible from so far away (if you're inside the 'start hearing' range) that it would take a lot of walking to get out of the radius of the sound

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, I managed to turn…
Tue, 07/25/2023 - 18:24

Thanks, I managed to turn this into a command that execute the sound with max volume only on the players that are in the bossfight by giving a tag to everyone next to the boss ! :)