MusicBuilder

Builder for Music.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun build(): Music

Builds a Music instance from the current state of this builder.

Link copied to clipboard
fun maxDelay(maxDelay: Int)

Sets the maxDelay setting of the music to the given maxDelay.

Link copied to clipboard
fun minDelay(minDelay: Int)

Sets the minDelay setting of the music to the given minDelay.

Link copied to clipboard
fun replaceCurrentMusic(replaceCurrentMusic: Boolean)

Sets the replaceCurrentMusic setting of the music to the given replaceCurrentMusic.

Link copied to clipboard
fun soundEvent(soundEvent: Holder<SoundEvent>)

Sets the soundEvent setting of the music to the given soundEvent via a Holder that either already contains a SoundEvent, or is set later by the SoundEvent Registry.

fun soundEvent(soundEventId: ResourceKey<SoundEvent>)

Sets the soundEvent setting of the music to the given soundEventId via its ResourceKey. If the SoundEvent is not yet registered, an empty Holder will be created and the SoundEvent will be set later by the SoundEvent Registry.

fun soundEvent(soundEventId: ResourceLocation)

Sets the soundEvent setting of the music to the given soundEventId via its ResourceLocation. If the SoundEvent is not yet registered, an empty Holder will be created and the SoundEvent will be set later by the SoundEvent Registry.

fun soundEvent(soundEvent: SoundEvent)

Sets the soundEvent setting of the music to the given soundEvent.