Package com.minecolonies.api.sounds
Class SoundManager
java.lang.Object
com.minecolonies.api.sounds.SoundManager
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 ClassesModifier and TypeClassDescriptionstatic classStorage container for a specific sound. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddToQueue(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 voidtick()Tick the sound queue to play a sound.
-
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.pitch- the pitch to play it with.volume- the volume to play it at.
-