Class SoundBuilder
-
- All Implemented Interfaces:
-
com.tterrag.registrate.builders.Builder,com.tterrag.registrate.util.nullness.NonNullSupplier,java.util.function.Supplier
public class SoundBuilder<P extends Object> extends AbstractBuilder<SoundEvent, SoundEvent, P, SoundBuilder<P>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSoundBuilder.Companion
-
Field Summary
Fields Modifier and Type Field Description private Booleanreplaceprivate Floatrangeprivate final List<SoundDefinition.Sound>filesprivate final AbstractRegistrate<?>ownerprivate final Pparentprivate final Stringnameprivate final BuilderCallbackcallbackprivate final ResourceKey<out Registry<SoundEvent>>registryKeyprivate final Multimap<ProviderType<out RegistrateTagsProvider<?>>, TagKey<?>>tagsByTypeprivate final LazyRegistryEntry<SoundEvent, SoundEvent>safeSupplierprivate final BooleanisOptionalpublic final static SoundBuilder.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description SoundBuilder(AbstractRegistrate<?> owner, P parent, String name, BuilderCallback callback)
-
Method Summary
Modifier and Type Method Description final BooleangetReplace()final UnitsetReplace(Boolean replace)final FloatgetRange()final UnitsetRange(Float range)final List<SoundDefinition.Sound>getFiles()final StringsubtitleKey(SoundEvent event)final SoundBuilder<P>addFile(SoundDefinition.Sound file)final SoundBuilder<P>replace(Boolean replace)final SoundBuilder<P>withRange(Float range)final SoundBuilder<P>subtitle(String text)final SoundBuilder<P>defaultLang()final SoundFileBuilder<P>defaultFile()final SoundFileBuilder<P>file(String path)final SoundFileBuilder<P>file(ResourceLocation path)final SoundBuilder<P>simple(Boolean stream)SoundEventcreateEntry()RegistryEntry<SoundEvent, SoundEvent>register()-
Methods inherited from class com.tterrag.registrate.builders.AbstractBuilder
asOptional, asSupplier, asTag, createEntryWrapper, getCallback, getName, getOwner, getParent, getRegistryKey, lang, lang, lang, removeTag, tag -
Methods inherited from class com.tterrag.registrate.builders.Builder
addMiscData, build, dataMap, dataMap, get, getEntry, onRegister, onRegisterAfter, setData, transform -
Methods inherited from class com.tterrag.registrate.util.nullness.NonNullSupplier
lazy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getReplace
final Boolean getReplace()
-
setReplace
final Unit setReplace(Boolean replace)
-
subtitleKey
final String subtitleKey(SoundEvent event)
-
addFile
final SoundBuilder<P> addFile(SoundDefinition.Sound file)
-
replace
final SoundBuilder<P> replace(Boolean replace)
-
withRange
final SoundBuilder<P> withRange(Float range)
-
subtitle
final SoundBuilder<P> subtitle(String text)
-
defaultLang
final SoundBuilder<P> defaultLang()
-
defaultFile
final SoundFileBuilder<P> defaultFile()
-
file
final SoundFileBuilder<P> file(String path)
-
file
final SoundFileBuilder<P> file(ResourceLocation path)
-
simple
final SoundBuilder<P> simple(Boolean stream)
-
createEntry
SoundEvent createEntry()
-
register
RegistryEntry<SoundEvent, SoundEvent> register()
-
-
-
-