Uses of Record Class
net.minecraft.sounds.Music
Packages that use Music
Package
Description
Events fired only on the client-side, chiefly related to rendering and user interfaces (screens and input).
-
Uses of Music in net.minecraft.client
Methods in net.minecraft.client that return Music -
Uses of Music in net.minecraft.client.gui.screens
Methods in net.minecraft.client.gui.screens that return MusicModifier and TypeMethodDescription@Nullable MusicScreen.getBackgroundMusic()WinScreen.getBackgroundMusic() -
Uses of Music in net.minecraft.client.sounds
Methods in net.minecraft.client.sounds with parameters of type MusicModifier and TypeMethodDescriptionprivate static booleanMusicManager.canReplace(Music music, SoundInstance currentMusic) private intMusicManager.MusicFrequency.getNextSongDelay(@Nullable Music music, RandomSource random) booleanMusicManager.isPlayingMusic(Music music) voidMusicManager.startPlaying(Music music) voidMusicManager.stopPlaying(Music music) Stops playing the specified Music selector. -
Uses of Music in net.minecraft.sounds
Fields in net.minecraft.sounds declared as MusicModifier and TypeFieldDescriptionstatic final MusicMusics.CREATIVEstatic final MusicMusics.CREDITSstatic final MusicMusics.ENDstatic final MusicMusics.END_BOSSstatic final MusicMusics.GAMEstatic final MusicMusics.MENUstatic final MusicMusics.UNDER_WATERFields in net.minecraft.sounds with type parameters of type MusicMethods in net.minecraft.sounds that return MusicModifier and TypeMethodDescriptionstatic MusicMusics.createGameMusic(Holder<SoundEvent> soundEvent) -
Uses of Music in net.minecraft.world.attribute
Fields in net.minecraft.world.attribute with type parameters of type MusicModifier and TypeFieldDescriptionBackgroundMusic.creativeMusicThe field for thecreativeMusicrecord component.BackgroundMusic.defaultMusicThe field for thedefaultMusicrecord component.BackgroundMusic.underwaterMusicThe field for theunderwaterMusicrecord component.Methods in net.minecraft.world.attribute that return types with arguments of type MusicModifier and TypeMethodDescriptionBackgroundMusic.creativeMusic()Returns the value of thecreativeMusicrecord component.BackgroundMusic.defaultMusic()Returns the value of thedefaultMusicrecord component.BackgroundMusic.select(boolean isCreative, boolean isUnderwater) BackgroundMusic.underwaterMusic()Returns the value of theunderwaterMusicrecord component.Methods in net.minecraft.world.attribute with parameters of type MusicConstructors in net.minecraft.world.attribute with parameters of type MusicConstructor parameters in net.minecraft.world.attribute with type arguments of type Music -
Uses of Music in net.neoforged.neoforge.client
Methods in net.neoforged.neoforge.client that return MusicModifier and TypeMethodDescriptionstatic @Nullable MusicClientHooks.selectMusic(Music situational, @Nullable SoundInstance playing) Methods in net.neoforged.neoforge.client with parameters of type MusicModifier and TypeMethodDescriptionstatic @Nullable MusicClientHooks.selectMusic(Music situational, @Nullable SoundInstance playing) -
Uses of Music in net.neoforged.neoforge.client.event
Fields in net.neoforged.neoforge.client.event declared as MusicModifier and TypeFieldDescriptionprivate @Nullable MusicSelectMusicEvent.musicprivate final MusicSelectMusicEvent.originalMusicMethods in net.neoforged.neoforge.client.event that return MusicModifier and TypeMethodDescription@Nullable MusicSelectMusicEvent.getMusic()Returns the Music to be played, ornullif any playing music should be cancelled.SelectMusicEvent.getOriginalMusic()Returns the original situational music that was selected.Methods in net.neoforged.neoforge.client.event with parameters of type MusicModifier and TypeMethodDescriptionvoidSelectMusicEvent.overrideMusic(@Nullable Music newMusic) Sets the music and then cancels the event so that other listeners will not be invoked.
Note that listeners usingSubscribeEvent.receiveCanceled()will still be able to override this, but by default they will notvoidChanges the situational music.Constructors in net.neoforged.neoforge.client.event with parameters of type MusicModifierConstructorDescriptionSelectMusicEvent(Music music, @Nullable SoundInstance playingMusic)