Class MusicManager

java.lang.Object
net.minecraft.client.sounds.MusicManager

public class MusicManager extends Object
The MusicManager class manages the playing of music in Minecraft.
  • Field Details

    • STARTING_DELAY

      private static final int STARTING_DELAY
      The delay before starting to play the next song.
      See Also:
    • random

      private final RandomSource random
    • minecraft

      private final Minecraft minecraft
    • currentMusic

      @Nullable private SoundInstance currentMusic
    • nextSongDelay

      private int nextSongDelay
      The delay until the next song starts.
  • Constructor Details

    • MusicManager

      public MusicManager(Minecraft pMinecraft)
  • Method Details

    • tick

      public void tick()
    • startPlaying

      public void startPlaying(Music pSelector)
      Starts playing the specified Music selector.
      Parameters:
      pSelector - the Music selector to play
    • stopPlaying

      public void stopPlaying(Music pMusic)
      Stops playing the specified Music selector.
      Parameters:
      pMusic - the Music selector to stop playing
    • stopPlaying

      public void stopPlaying()
    • isPlayingMusic

      public boolean isPlayingMusic(Music pSelector)
      Returns true if the Music selector is currently playing, false otherwise.
      Parameters:
      pSelector - the Music selector to check for
      Returns:
      true if the Music selector is currently playing, false otherwise