Class SoundEvent.SoundSourceEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.sound.SoundEvent
net.minecraftforge.client.event.sound.SoundEvent.SoundSourceEvent
Direct Known Subclasses:
PlaySoundSourceEvent, PlayStreamingSourceEvent
Enclosing class:
SoundEvent

public abstract static class SoundEvent.SoundSourceEvent extends SoundEvent
Superclass for when a sound has started to play on an audio channel.

These events are fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getSound

      public SoundInstance getSound()
      Returns the sound being played.
      Returns:
      the sound being played
    • getChannel

      public Channel getChannel()
      Returns the audio channel on which the sound is playing on.
      Returns:
      the audio channel on which the sound is playing on
    • getName

      public String getName()
      Returns the name of the sound being played. This is equivalent to the path of the location of the original sound.
      Returns:
      the name of the sound being played