feat(delta): config persistence via Configurations.saveGlobalSection + decoupled sound range API
Build Delta / Build paperclip jar (push) Failing after 5m52s
Build Delta / Build paperclip jar (push) Failing after 5m52s
This commit is contained in:
@@ -3616,6 +3616,28 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
void playSound(@NotNull Entity entity, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, long seed);
|
||||
|
||||
/**
|
||||
* Delta: plays a sound with an explicit audible range, decoupled from volume.
|
||||
* <p>
|
||||
* In vanilla the audible distance is derived from volume (16 blocks per volume unit),
|
||||
* so a sound that must be heard 150 blocks away requires volume ~10, which then clips
|
||||
* badly for players standing next to the source. This overload lets you pick gain and
|
||||
* distance independently.
|
||||
* <p>
|
||||
* Requires the Delta core with {@code delta.decoupled-sound-range-enabled: true};
|
||||
* on any other server it silently falls back to vanilla behaviour.
|
||||
*
|
||||
* @param location the location to play the sound at
|
||||
* @param sound the sound to play
|
||||
* @param category the category of the sound
|
||||
* @param volume the loudness at the source
|
||||
* @param pitch the pitch of the sound
|
||||
* @param range the audible radius in blocks, independent of volume
|
||||
*/
|
||||
default void playSound(@NotNull Location location, @NotNull Sound sound, @NotNull SoundCategory category, float volume, float pitch, float range) {
|
||||
playSound(location, sound, category, volume, pitch); // fallback: range == f(volume)
|
||||
}
|
||||
|
||||
/**
|
||||
* Play a Sound at the location of the provided entity in the World. For sounds
|
||||
* with multiple variations passing the same seed will always play the same
|
||||
|
||||
Reference in New Issue
Block a user