Class PositionalVoiceSpeaker

java.lang.Object
com.hypixel.hytale.server.core.modules.voice.VoiceSpeaker
com.hypixel.hytale.server.core.modules.voice.PositionalVoiceSpeaker

public final class PositionalVoiceSpeaker extends VoiceSpeaker
A VoiceSpeaker that emits from a fixed world position, heard by nearby players. Move it with setPosition(Vector3d). Obtained from VoiceModule.openPositionalVoice(World, Vector3d). Positional voice does not apply the underwater muffle (only entity speakers sample fluid state).
  • Method Details

    • setPosition

      public void setPosition(@Nonnull org.joml.Vector3d position)
      Moves the emit position. Thread-safe; the new position applies to subsequent frames.
      Parameters:
      position - the new emit position
      Throws:
      IllegalArgumentException - if any coordinate of position is not finite