Package io.papermc.paper.registry.data
Interface InstrumentRegistryEntry.Builder
- All Superinterfaces:
InstrumentRegistryEntry,RegistryBuilder<MusicInstrument>
- Enclosing interface:
InstrumentRegistryEntry
@Experimental
@NonExtendable
public static interface InstrumentRegistryEntry.Builder
extends InstrumentRegistryEntry, RegistryBuilder<MusicInstrument>
A mutable builder for the
InstrumentRegistryEntry 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.InstrumentRegistryEntry
InstrumentRegistryEntry.Builder -
Method Summary
Modifier and TypeMethodDescriptiondescription(Component description) Sets the description for this instrument.duration(@org.checkerframework.checker.index.qual.Positive float duration) Sets the duration of use for this instrument.range(@org.checkerframework.checker.index.qual.Positive float range) Sets the range for this instrument.soundEvent(RegistryHolder<Sound, SoundEventRegistryEntry> soundEvent) Sets the sound event for this instrument.soundEvent(TypedKey<Sound> soundEvent) Sets the sound event for this instrument to a sound event present in theRegistryKey.SOUND_EVENTregistry.soundEvent(Consumer<RegistryBuilderFactory<Sound, ? extends SoundEventRegistryEntry.Builder>> soundEvent) Sets the sound event for this instrument to a new sound event.Methods inherited from interface io.papermc.paper.registry.data.InstrumentRegistryEntry
description, duration, range, soundEvent
-
Method Details
-
soundEvent
@Contract(value="_ -> this", mutates="this") InstrumentRegistryEntry.Builder soundEvent(TypedKey<Sound> soundEvent) Sets the sound event for this instrument to a sound event present in theRegistryKey.SOUND_EVENTregistry.This will override both
soundEvent(Consumer)andsoundEvent(RegistryHolder)- Parameters:
soundEvent- the sound event- Returns:
- this builder
- See Also:
-
soundEvent
@Contract(value="_ -> this", mutates="this") InstrumentRegistryEntry.Builder soundEvent(Consumer<RegistryBuilderFactory<Sound, ? extends SoundEventRegistryEntry.Builder>> soundEvent) Sets the sound event for this instrument 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") InstrumentRegistryEntry.Builder soundEvent(RegistryHolder<Sound, SoundEventRegistryEntry> soundEvent) Sets the sound event for this instrument.This will override both
soundEvent(Consumer)andsoundEvent(TypedKey)- Parameters:
soundEvent- the sound event- Returns:
- this builder
- See Also:
-
duration
@Contract(value="_ -> this", mutates="this") InstrumentRegistryEntry.Builder duration(@org.checkerframework.checker.index.qual.Positive float duration) Sets the duration of use for this instrument.- Parameters:
duration- the duration (positive)- Returns:
- this builder
- See Also:
-
range
@Contract(value="_ -> this", mutates="this") InstrumentRegistryEntry.Builder range(@org.checkerframework.checker.index.qual.Positive float range) Sets the range for this instrument.- Parameters:
range- the range (positive)- Returns:
- this builder
- See Also:
-
description
@Contract(value="_ -> this", mutates="this") InstrumentRegistryEntry.Builder description(Component description) Sets the description for this instrument.- Parameters:
description- the description- Returns:
- this builder
- See Also:
-