Package net.kyori.adventure.sound
Enum Sound.Source
- All Implemented Interfaces:
Serializable
,Comparable<Sound.Source>
- Enclosing interface:
- Sound
The sound source.
The documentation for each source details the vanilla use.
- Since:
- 4.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
A provider of sound sources. -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe ambient sound source.The block sound source.The hostile sound source.The main sound source.The music sound source.The neutral sound source.The player sound source.The record sound source.The UI sound source.The voice sound source.The weather sound source. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Sound.Source
Returns the enum constant of this type with the specified name.static Sound.Source[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MASTER
The main sound source.This source controls the overall sound of the game.
- Since:
- 4.0.0
-
MUSIC
The music sound source.This source handles the in-game soundtrack.
- Since:
- 4.0.0
-
RECORD
The record sound source.This source handles jukeboxes and note blocks.
- Since:
- 4.0.0
-
WEATHER
The weather sound source.This source handles weather sounds.
- Since:
- 4.0.0
-
BLOCK
The block sound source.This source handles player interaction with blocks as well as passive block sounds.
- Since:
- 4.0.0
-
HOSTILE
The hostile sound source.This source handles hostile entities.
- Since:
- 4.0.0
-
NEUTRAL
The neutral sound source.This source handles neutral entities.
- Since:
- 4.0.0
-
PLAYER
The player sound source.This source handles player entities.
- Since:
- 4.0.0
-
AMBIENT
The ambient sound source.This source handles ambience.
- Since:
- 4.0.0
-
VOICE
The voice sound source.This source handles the narrator.
- Since:
- 4.0.0
-
UI
The UI sound source.This source handles UI actions.
- Since:
- 4.22.0
- Since Minecraft:
- 1.21.6
-
-
Field Details
-
NAMES
The name map.- Since:
- 4.0.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-