Class SoundManager

java.lang.Object
com.minecolonies.api.sounds.SoundManager

public class SoundManager extends Object
This is a sound manager that allows playing a queue of sounds, for a specific time with length between a series of sounds.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Storage container for a specific sound.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addToQueue(UUID uuid, net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource source, int repetitions, int length, net.minecraft.core.BlockPos pos, float volume, float pitch)
    Add a new sound to the queue.
    static void
    Tick the sound queue to play a sound.

    Methods inherited from class java.lang.Object

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

    • SoundManager

      public SoundManager()
  • Method Details

    • tick

      public static void tick()
      Tick the sound queue to play a sound.
    • addToQueue

      public static void addToQueue(UUID uuid, net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource source, int repetitions, int length, net.minecraft.core.BlockPos pos, float volume, float pitch)
      Add a new sound to the queue.
      Parameters:
      soundEvent - the sound event to play.
      source - the sound source.
      repetitions - the number of repetitions of it.
      length - the length of it.
      pos - the pos to play it at.
      volume - the volume to play it at.
      pitch - the pitch to play it with.