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 Channel
channel
private SoundListener
listener
private List<SoundInstanceListener>
listeners
private SoundManager
loader
private static Logger
LOGGER
private static Marker
MARKER
private List<Sound>
preloadedSounds
private GameOptions
settings
private Map<SoundInstance,Integer>
soundEndTicks
private SoundEngine
soundEngine
private SoundLoader
soundLoader
private Multimap<SoundCategory,SoundInstance>
sounds
private List<TickableSoundInstance>
soundsToPlayNextTick
private Map<SoundInstance,Channel.SourceManager>
sources
private boolean
started
private Map<SoundInstance,Integer>
startTicks
private SoundExecutor
taskQueue
private List<TickableSoundInstance>
tickingSounds
private int
ticks
private static Set<Identifier>
unknownSounds
-
Constructor Summary
Constructors Constructor Description SoundSystem(SoundManager loader, GameOptions settings, ResourceManager resourceManager)
-
Method Summary
Modifier and Type Method Description void
addPreloadedSound(Sound sound)
private static boolean
canRepeatInstantly(SoundInstance soundInstance)
private float
getAdjustedPitch(SoundInstance soundInstance)
private float
getAdjustedVolume(SoundInstance soundInstance)
String
getDebugString()
private float
getSoundVolume(SoundCategory soundCategory)
boolean
isPlaying(SoundInstance soundInstance)
private static boolean
isRepeatDelayed(SoundInstance soundInstance)
void
pauseAll()
void
play(SoundInstance soundInstance)
void
play(SoundInstance sound, int delay)
void
playNextTick(TickableSoundInstance sound)
void
registerListener(SoundInstanceListener soundInstanceListener)
void
reloadSounds()
void
resumeAll()
private static boolean
shouldRepeatInstantly(SoundInstance soundInstance)
private void
start()
void
stop()
void
stop(SoundInstance soundInstance)
void
stopAll()
void
stopSounds(Identifier identifier, SoundCategory soundCategory)
private void
tick()
void
tick(boolean bool)
void
unregisterListener(SoundInstanceListener soundInstanceListener)
void
updateListenerPosition(Camera camera)
void
updateSoundVolume(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
-