Package net.minecraft.client.sound
Class SoundSystem
java.lang.Object
net.minecraft.client.sound.SoundSystem
@Environment(CLIENT) public class SoundSystem extends Object
-
Field Summary
Fields Modifier and Type Field Description private Channelchannelprivate SoundListenerlistenerprivate List<SoundInstanceListener>listenersprivate SoundManagerloaderprivate static LoggerLOGGERprivate static MarkerMARKERprivate List<Sound>preloadedSoundsprivate GameOptionssettingsprivate Map<SoundInstance,Integer>soundEndTicksprivate SoundEnginesoundEngineprivate SoundLoadersoundLoaderprivate Multimap<SoundCategory,SoundInstance>soundsprivate List<TickableSoundInstance>soundsToPlayNextTickprivate Map<SoundInstance,Channel.SourceManager>sourcesprivate booleanstartedprivate Map<SoundInstance,Integer>startTicksprivate SoundExecutortaskQueueprivate List<TickableSoundInstance>tickingSoundsprivate intticksprivate static Set<Identifier>unknownSounds -
Constructor Summary
Constructors Constructor Description SoundSystem(SoundManager loader, GameOptions settings, ResourceManager resourceManager) -
Method Summary
Modifier and Type Method Description voidaddPreloadedSound(Sound sound)private static booleancanRepeatInstantly(SoundInstance soundInstance)private floatgetAdjustedPitch(SoundInstance soundInstance)private floatgetAdjustedVolume(SoundInstance soundInstance)StringgetDebugString()private floatgetSoundVolume(SoundCategory soundCategory)booleanisPlaying(SoundInstance soundInstance)private static booleanisRepeatDelayed(SoundInstance soundInstance)voidpauseAll()voidplay(SoundInstance soundInstance)voidplay(SoundInstance sound, int delay)voidplayNextTick(TickableSoundInstance sound)voidregisterListener(SoundInstanceListener soundInstanceListener)voidreloadSounds()voidresumeAll()private static booleanshouldRepeatInstantly(SoundInstance soundInstance)private voidstart()voidstop()voidstop(SoundInstance soundInstance)voidstopAll()voidstopSounds(Identifier identifier, SoundCategory soundCategory)private voidtick()voidtick(boolean bool)voidunregisterListener(SoundInstanceListener soundInstanceListener)voidupdateListenerPosition(Camera camera)voidupdateSoundVolume(SoundCategory soundCategory, float volume)
-
Field Details
-
MARKER
-
LOGGER
-
unknownSounds
-
loader
-
settings
-
started
private boolean started -
soundEngine
-
listener
-
soundLoader
-
taskQueue
-
channel
-
ticks
private int ticks -
sources
-
sounds
-
tickingSounds
-
startTicks
-
soundEndTicks
-
listeners
-
soundsToPlayNextTick
-
preloadedSounds
-
-
Constructor Details
-
SoundSystem
-
-
Method Details
-
reloadSounds
public void reloadSounds() -
start
private void start() -
getSoundVolume
-
updateSoundVolume
-
stop
public void stop() -
stop
-
stopAll
public void stopAll() -
registerListener
-
unregisterListener
-
tick
public void tick(boolean bool) -
tick
private void tick() -
canRepeatInstantly
-
isRepeatDelayed
-
shouldRepeatInstantly
-
isPlaying
-
play
-
playNextTick
-
addPreloadedSound
-
getAdjustedPitch
-
getAdjustedVolume
-
pauseAll
public void pauseAll() -
resumeAll
public void resumeAll() -
play
-
updateListenerPosition
-
stopSounds
-
getDebugString
-