fix: follow players and restart looping sounds
Build / maven (push) Successful in 44s
Build and publish release / Build and publish Ambient Audio Zone (push) Successful in 45s

This commit is contained in:
root
2026-08-04 05:44:02 +02:00
parent b13a6c6661
commit b8215dffb9
4 changed files with 43 additions and 11 deletions
+4 -2
View File
@@ -52,7 +52,7 @@ zones:
enabled: true
```
`fade-distance` expands the cuboid's audible envelope. Outside that envelope the plugin does not select or start the zone. Within it, the sound packet is emitted at `origin`, so Minecraft's own positional audio supplies the continuous directional attenuation; set the origin at a speaker, stage, jukebox, or other real source rather than the cuboid centre.
`fade-distance` expands the cuboid's audible envelope. With `playback.follow-player: true` (the default), the sound is attached to each listener and its volume fades from the configured volume inside the cuboid to silence at the edge of the fade envelope. Set it to `false` to use the fixed `origin` as a directional source instead.
## Overlaps and performance
@@ -63,9 +63,11 @@ playback:
check-interval-ticks: 10
leave-grace-ticks: 100
blend-overlapping-zones: false
follow-player: true
loop-restart-ticks: 2680
```
When a selected zone remains selected, Ambient Audio Zone sends no new sound packet. Leaving starts a configurable grace timer; returning before it expires preserves the existing client playback instead of restarting it. 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. In follow-player mode it re-emits only when the calculated fade changes materially, and it uses an entity-attached packet so the sound follows the player. 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