Package io.papermc.paper.registry.data
Interface JukeboxSongRegistryEntry.Builder
- All Superinterfaces:
JukeboxSongRegistryEntry
,RegistryBuilder<JukeboxSong>
- Enclosing interface:
JukeboxSongRegistryEntry
@Experimental
@NonExtendable
public static interface JukeboxSongRegistryEntry.Builder
extends JukeboxSongRegistryEntry, RegistryBuilder<JukeboxSong>
A mutable builder for the
JukeboxSongRegistryEntry
plugins may change in applicable registry events.
The following values are required for each builder:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.paper.registry.data.JukeboxSongRegistryEntry
JukeboxSongRegistryEntry.Builder
-
Method Summary
Modifier and TypeMethodDescriptioncomparatorOutput
(@org.jetbrains.annotations.Range(from=0L, to=15L) int comparatorOutput) Sets the comparator output for this song.description
(Component description) Sets the description for this song.lengthInSeconds
(@org.checkerframework.checker.index.qual.Positive float lengthInSeconds) Sets the length in seconds for this song.soundEvent
(RegistryHolder<Sound, SoundEventRegistryEntry> soundEvent) Sets the sound event for this song.soundEvent
(TypedKey<Sound> soundEvent) Sets the sound event for this song to a sound event present in theRegistryKey.SOUND_EVENT
registry.soundEvent
(Consumer<RegistryBuilderFactory<Sound, ? extends SoundEventRegistryEntry.Builder>> soundEvent) Sets the sound event for this song to a new sound event.Methods inherited from interface io.papermc.paper.registry.data.JukeboxSongRegistryEntry
comparatorOutput, description, lengthInSeconds, soundEvent
-
Method Details
-
soundEvent
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder soundEvent(TypedKey<Sound> soundEvent) Sets the sound event for this song to a sound event present in theRegistryKey.SOUND_EVENT
registry.This will override both
soundEvent(Consumer)
andsoundEvent(RegistryHolder)
- Parameters:
soundEvent
- the sound event- Returns:
- this builder
- See Also:
-
soundEvent
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder soundEvent(Consumer<RegistryBuilderFactory<Sound, ? extends SoundEventRegistryEntry.Builder>> soundEvent) Sets the sound event for this song to a new sound event.This will override both
soundEvent(TypedKey)
andsoundEvent(RegistryHolder)
- Parameters:
soundEvent
- the sound event- Returns:
- this builder
- See Also:
-
soundEvent
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder soundEvent(RegistryHolder<Sound, SoundEventRegistryEntry> soundEvent) Sets the sound event for this song.This will override both
soundEvent(Consumer)
andsoundEvent(TypedKey)
- Parameters:
soundEvent
- the sound event- Returns:
- this builder
- See Also:
-
description
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder description(Component description) Sets the description for this song.- Parameters:
description
- the description- Returns:
- this builder
-
lengthInSeconds
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder lengthInSeconds(@org.checkerframework.checker.index.qual.Positive float lengthInSeconds) Sets the length in seconds for this song.- Parameters:
lengthInSeconds
- the length in seconds (positive)- Returns:
- this builder
-
comparatorOutput
@Contract(value="_ -> this", mutates="this") JukeboxSongRegistryEntry.Builder comparatorOutput(@org.jetbrains.annotations.Range(from=0L, to=15L) int comparatorOutput) Sets the comparator output for this song.- Parameters:
comparatorOutput
- the comparator output [0-15]- Returns:
- this builder
-