Started by
Megidora
on
Topic category: Help with modding (Java Edition)
So, I made that an entity play a music when you right click it, the entity is rideable(which mean that usually it moves alot), but unlike the entity the sound stay in one place which is bad. I tried increasing the level but it is not solving the problem because the sound source is still in one place but we can just hear it from far distance, thanks for help
Unfortunately this is a side effect of how Minecraft's sound effects work, it's not designed to change the position of a sound once the sound starts playing. The only solution I can really recommend is dividing your music up into smaller segments that can be rearranged together, and playing one of these at the entity's location every couple seconds or so.
well, I have this idea in mind, but I thought that there will be easier way for this, but thank you anyway
make the check on PlayerUpdateTick:
-If Entity is Riding Entity X (your rideable mob)
then play sound Y (your song)
ops nvm you want the music to follow you, bummer thats a tuff one
use the playsound command on the riding entity, learn about it in the wiki and apply it to the entity that is riding the mob