Enum Sound.Source

java.lang.Object
java.lang.Enum<Sound.Source>
net.kyori.adventure.sound.Sound.Source
All Implemented Interfaces:
Serializable, Comparable<Sound.Source>
Enclosing interface:
Sound

public static enum Sound.Source extends Enum<Sound.Source>
The sound source.

The documentation for each source details the vanilla use.

Since:
4.0.0
  • Enum Constant Details

    • MASTER

      public static final Sound.Source MASTER
      The main sound source.

      This source controls the overall sound of the game.

      Since:
      4.0.0
    • MUSIC

      public static final Sound.Source MUSIC
      The music sound source.

      This source handles the in-game soundtrack.

      Since:
      4.0.0
    • RECORD

      public static final Sound.Source RECORD
      The record sound source.

      This source handles jukeboxes and note blocks.

      Since:
      4.0.0
    • WEATHER

      public static final Sound.Source WEATHER
      The weather sound source.

      This source handles weather sounds.

      Since:
      4.0.0
    • BLOCK

      public static final Sound.Source BLOCK
      The block sound source.

      This source handles player interaction with blocks as well as passive block sounds.

      Since:
      4.0.0
    • HOSTILE

      public static final Sound.Source HOSTILE
      The hostile sound source.

      This source handles hostile entities.

      Since:
      4.0.0
    • NEUTRAL

      public static final Sound.Source NEUTRAL
      The neutral sound source.

      This source handles neutral entities.

      Since:
      4.0.0
    • PLAYER

      public static final Sound.Source PLAYER
      The player sound source.

      This source handles player entities.

      Since:
      4.0.0
    • AMBIENT

      public static final Sound.Source AMBIENT
      The ambient sound source.

      This source handles ambience.

      Since:
      4.0.0
    • VOICE

      public static final Sound.Source VOICE
      The voice sound source.

      This source handles the narrator.

      Since:
      4.0.0
    • UI

      public static final Sound.Source UI
      The UI sound source.

      This source handles UI actions.

      Since:
      4.22.0
      Since Minecraft:
      1.21.6
  • Field Details

  • Method Details

    • values

      public static Sound.Source[] 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

      public static Sound.Source valueOf(String name)
      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 name
      NullPointerException - if the argument is null