Class SoundUtils

java.lang.Object
org.geysermc.geyser.util.SoundUtils

public final class SoundUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    playBuiltinSound​(GeyserSession session, com.github.steveice10.mc.protocol.data.game.level.sound.BuiltinSound javaSound, com.nukkitx.math.vector.Vector3f position, float volume, float pitch)
    Translates and plays a Java Builtin Sound for a Bedrock client
    static String
    translatePlaySound​(com.github.steveice10.mc.protocol.data.game.level.sound.Sound sound)
    Translates a Java Custom or Builtin Sound to its Bedrock equivalent

    Methods inherited from class java.lang.Object

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

    • translatePlaySound

      public static String translatePlaySound(com.github.steveice10.mc.protocol.data.game.level.sound.Sound sound)
      Translates a Java Custom or Builtin Sound to its Bedrock equivalent
      Parameters:
      sound - the sound to translate
      Returns:
      a Bedrock sound
    • playBuiltinSound

      public static void playBuiltinSound(GeyserSession session, com.github.steveice10.mc.protocol.data.game.level.sound.BuiltinSound javaSound, com.nukkitx.math.vector.Vector3f position, float volume, float pitch)
      Translates and plays a Java Builtin Sound for a Bedrock client
      Parameters:
      session - the Bedrock client session.
      javaSound - the builtin sound to play
      position - the position
      pitch - the pitch