Package net.kyori.adventure.sound
Interface Sound.Builder
- All Superinterfaces:
 AbstractBuilder<Sound>
- Enclosing interface:
 - Sound
 
A builder for sound instances.
 
Type is required, all other options are optional.
- Since:
 - 4.12.0
 
- 
Method Summary
Modifier and TypeMethodDescription@NotNull Sound.Builderpitch(@org.jetbrains.annotations.Range(from=-1L, to=1L) float pitch) The pitch for this sound, indicating how high or low the sound can be heard.@NotNull Sound.Builderseed(long seed) The seed for this sound, used for weighted choices.@NotNull Sound.Builderseed(@NotNull OptionalLong seed) The seed for this sound, used for weighted choices.@NotNull Sound.Buildersource(@NotNull Sound.Source source) ASound.Sourceto tell the game where the sound is coming from.@NotNull Sound.Buildersource(@NotNull Sound.Source.Provider source) ASound.Sourceto tell the game where the sound is coming from.@NotNull Sound.Buildertype(@NotNull Supplier<? extends Sound.Type> typeSupplier) Set the type of this sound.@NotNull Sound.BuilderSet the type of this sound.@NotNull Sound.Buildertype(@NotNull Sound.Type type) Set the type of this sound.@NotNull Sound.Buildervolume(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) float volume) The volume for this sound, indicating how far away it can be heard.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
build 
- 
Method Details
- 
type
Set the type of this sound.Required.
- Parameters:
 type- resource location of the sound event to play- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
type
Set the type of this sound.Required.
- Parameters:
 type- a type of sound to play- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
type
Set the type of this sound.Required.
- Parameters:
 typeSupplier- a type of sound to play, evaluated lazily- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
source
ASound.Sourceto tell the game where the sound is coming from.By default,
Sound.Source.MASTERis used.- Parameters:
 source- a source- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
source
ASound.Sourceto tell the game where the sound is coming from.By default,
Sound.Source.MASTERis used.- Parameters:
 source- a source provider, evaluated eagerly- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
volume
@NotNull @NotNull Sound.Builder volume(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) float volume) The volume for this sound, indicating how far away it can be heard.Default value is
1.- Parameters:
 volume- the sound volume- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
pitch
@NotNull @NotNull Sound.Builder pitch(@org.jetbrains.annotations.Range(from=-1L, to=1L) float pitch) The pitch for this sound, indicating how high or low the sound can be heard.Default value is
1.- Parameters:
 pitch- the sound pitch- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
seed
The seed for this sound, used for weighted choices.The default seed is the world seed of the receiver's current world.
- Parameters:
 seed- the seed- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 - 
seed
The seed for this sound, used for weighted choices.The default seed is the world seed of the receiver's current world.
- Parameters:
 seed- the seed- Returns:
 - this builder
 - Since:
 - 4.12.0
 
 
 -