Class SoundEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.sound.SoundEvent
Direct Known Subclasses:
PlaySoundEvent, SoundEngineLoadEvent, SoundEvent.SoundSourceEvent

public abstract class SoundEvent extends net.neoforged.bus.api.Event
Superclass for sound related events.

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

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Superclass for when a sound has started to play on an audio channel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraft.client.sounds.SoundEngine
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SoundEvent(net.minecraft.client.sounds.SoundEngine engine)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.sounds.SoundEngine
    Returns the sound engine.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • engine

      private final net.minecraft.client.sounds.SoundEngine engine
  • Constructor Details

    • SoundEvent

      @Internal protected SoundEvent(net.minecraft.client.sounds.SoundEngine engine)
  • Method Details

    • getEngine

      public net.minecraft.client.sounds.SoundEngine getEngine()
      Returns the sound engine.
      Returns:
      the sound engine