Interface SoundEvent

All Superinterfaces:
Keyed, Wrapper

@NullMarked @AsOf("2.4.1") public interface SoundEvent extends Wrapper, Keyed
Wraps a Minecraft SoundEvent.
Since:
2.4.1
  • Field Details

  • Method Details

    • location

      @AsOf("2.4.1") ResourceKey location()
      Gets the location of the sound event.
      Returns:
      the location of the sound event
      Since:
      2.4.1
    • fixedRange

      @AsOf("2.4.1") Optional<Float> fixedRange()
      Gets the range of the sound event.
      Returns:
      the range of the sound event, if present
      Since:
      2.4.1
    • variableRange

      @AsOf("2.4.1") static SoundEvent variableRange(ResourceKey location)
      Creates a new sound event with a variable range.
      Parameters:
      location - the location of the sound event
      Returns:
      a new sound event with a variable range
      Since:
      2.4.1
    • fixedRange

      @AsOf("2.4.1") static SoundEvent fixedRange(ResourceKey location, float range)
      Creates a new sound event with a fixed range.
      Parameters:
      location - the location of the sound event
      range - the range of the sound event
      Returns:
      a new sound event with a fixed range
      Since:
      2.4.1