Package org.geysermc.geyser.util
Class SoundUtils
java.lang.Object
org.geysermc.geyser.util.SoundUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidplayBuiltinSound(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 clientstatic StringtranslatePlaySound(com.github.steveice10.mc.protocol.data.game.level.sound.Sound sound)Translates a Java Custom or Builtin Sound to its Bedrock equivalent
-
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 playposition- the positionpitch- the pitch
-