Package de.mrjulsen.dragnsounds.core
Class ClientSoundManager
java.lang.Object
de.mrjulsen.dragnsounds.core.ClientSoundManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
getAllSoundFiles
(Collection<IFilter<SoundFile>> filters, Consumer<SoundFile[]> callback) static SoundFile
getClientDummySoundFile
(String location, String id) static SoundPlaybackData
getData
(long soundId) static void
getSoundFile
(SoundLocation location, String id, Consumer<Optional<SoundFile>> callback) static void
init()
static void
playSoundQueue
(long soundId, int triggerIndex, SoundFile file, PlaybackConfig playback, long clientCallbackRequestId) static void
playUiSound
(long soundId, SoundFile file, float volume, float pitch) static void
playUiSound
(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch) static void
playWorldSound
(long soundId, SoundFile file, float volume, float pitch, net.minecraft.world.phys.Vec3 pos, boolean relative, int attenuationDistance) static void
playWorldSound
(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, net.minecraft.world.phys.Vec3 pos, boolean relative, int attenuationDistance) static void
printDebug
(List<String> debugScreen) static void
static void
seek
(long soundId, int ticks) static void
setAttenuationDistance
(long soundId, float distance) static void
setCone
(long soundId, net.minecraft.world.phys.Vec3 direction, float angleA, float angleB, float outerGain) static void
setDirection
(long soundId, net.minecraft.world.phys.Vec3 direction) static void
setDoppler
(long soundId, float dopplerFactor, net.minecraft.world.phys.Vec3 velocity) static void
setPaused
(long soundId, boolean pause) static void
setPitch
(long soundId, float pitch) static void
setPosition
(long soundId, net.minecraft.world.phys.Vec3 position) static void
setVolume
(long soundId, float volume) static void
static void
static void
stopSound
(long soundId) static long
uploadSound
(String filePath, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterUpload, BiConsumer<ClientApi.UploadProgress, ClientApi.UploadProgress> progress, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError)
-
Constructor Details
-
ClientSoundManager
public ClientSoundManager()
-
-
Method Details
-
init
public static void init() -
playUiSound
-
playWorldSound
public static void playWorldSound(long soundId, SoundFile file, float volume, float pitch, net.minecraft.world.phys.Vec3 pos, boolean relative, int attenuationDistance) -
playUiSound
public static void playUiSound(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch) -
playWorldSound
public static void playWorldSound(long soundId, SoundFile file, net.minecraft.sounds.SoundSource source, float volume, float pitch, net.minecraft.world.phys.Vec3 pos, boolean relative, int attenuationDistance) -
playSoundQueue
public static void playSoundQueue(long soundId, int triggerIndex, SoundFile file, PlaybackConfig playback, long clientCallbackRequestId) -
getData
-
setDoppler
public static void setDoppler(long soundId, float dopplerFactor, net.minecraft.world.phys.Vec3 velocity) -
setCone
public static void setCone(long soundId, net.minecraft.world.phys.Vec3 direction, float angleA, float angleB, float outerGain) -
setDirection
public static void setDirection(long soundId, net.minecraft.world.phys.Vec3 direction) -
setVolume
public static void setVolume(long soundId, float volume) -
setPaused
public static void setPaused(long soundId, boolean pause) -
setPitch
public static void setPitch(long soundId, float pitch) -
setPosition
public static void setPosition(long soundId, net.minecraft.world.phys.Vec3 position) -
setAttenuationDistance
public static void setAttenuationDistance(long soundId, float distance) -
seek
public static void seek(long soundId, int ticks) -
stopSound
public static void stopSound(long soundId) -
stopAllSoundInstances
-
stopAllSounds
public static void stopAllSounds() -
queueTask
-
uploadSound
public static long uploadSound(String filePath, SoundFile.Builder targetSettings, AudioSettings settings, Consumer<Optional<SoundFile>> afterUpload, BiConsumer<ClientApi.UploadProgress, ClientApi.UploadProgress> progress, Consumer<de.mrjulsen.mcdragonlib.data.StatusResult> onError) -
getAllSoundFiles
public static void getAllSoundFiles(Collection<IFilter<SoundFile>> filters, Consumer<SoundFile[]> callback) -
getSoundFile
public static void getSoundFile(SoundLocation location, String id, Consumer<Optional<SoundFile>> callback) -
getClientDummySoundFile
-
printDebug
-