Package net.minecraft.client.sounds
Class MusicManager
java.lang.Object
net.minecraft.client.sounds.MusicManager
The MusicManager class manages the playing of music in Minecraft.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
private SoundInstance
private MusicManager.MusicFrequency
private final Minecraft
private int
The delay until the next song starts.private final RandomSource
private static final int
The delay before starting to play the next song.private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
fadePlaying
(float pVolume) boolean
isPlayingMusic
(Music pSelector) void
setMinutesBetweenSongs
(MusicManager.MusicFrequency pMusicFrequency) void
void
startPlaying
(MusicInfo pMusic) void
void
stopPlaying
(Music pMusic) Stops playing the specified Music selector.void
tick()
-
Field Details
-
STARTING_DELAY
private static final int STARTING_DELAYThe delay before starting to play the next song.- See Also:
-
random
-
minecraft
-
currentMusic
-
gameMusicFrequency
-
currentGain
private float currentGain -
nextSongDelay
private int nextSongDelayThe delay until the next song starts. -
toastShown
private boolean toastShown
-
-
Constructor Details
-
MusicManager
-
-
Method Details
-
tick
public void tick() -
startPlaying
-
showNowPlayingToastIfNeeded
public void showNowPlayingToastIfNeeded() -
stopPlaying
Stops playing the specified Music selector.- Parameters:
pMusic
- the Music selector to stop playing
-
stopPlaying
public void stopPlaying() -
fadePlaying
private boolean fadePlaying(float pVolume) -
isPlayingMusic
-
getCurrentMusicTranslationKey
-
setMinutesBetweenSongs
-