fix: keep active sounds from restarting during movement
Build / maven (push) Successful in 43s
Build and publish release / Build and publish Ambient Audio Zone (push) Successful in 45s

This commit is contained in:
root
2026-08-04 06:06:30 +02:00
parent f11366088c
commit 247aa3cc90
4 changed files with 11 additions and 7 deletions
+2 -1
View File
@@ -64,10 +64,11 @@ playback:
leave-grace-ticks: 100
blend-overlapping-zones: false
follow-player: true
fade-volume-updates: false
loop-restart-ticks: 2680
```
When a selected zone remains selected, Ambient Audio Zone normally sends no new sound packet. In follow-player mode it uses rate-limited fade updates and stops the previous packet before re-emitting, preventing layered copies of the sound. Bukkit has no mutable-volume packet, so these updates are necessarily discrete; resource-pack loops are the smoothest option. Leaving starts a configurable grace timer; returning before it expires preserves the existing client playback instead of restarting it. `loop-restart-ticks` is a fallback for sounds whose resource-pack definition does not loop; set it to the exact sound length, while resource-pack `loop: true` remains the seamless option. Reloading or editing a zone intentionally replaces its active sound.
When a selected zone remains selected, Ambient Audio Zone normally sends no new sound packet, so walking cannot restart or stack the audio. `fade-volume-updates` is disabled by default because Bukkit has no mutable-volume packet; enabling it approximates the fade by stopping and re-emitting the sound, which necessarily restarts it. For smooth native distance attenuation, disable `follow-player` and use a central `origin`. Leaving starts a configurable grace timer; returning before it expires preserves the existing client playback instead of restarting it. `loop-restart-ticks` is a fallback for sounds whose resource-pack definition does not loop; set it to the exact sound length, while resource-pack `loop: true` remains the seamless option. Reloading or editing a zone intentionally replaces its active sound.
## Resource-pack looping note