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 class
SoundBuilder.Companion
-
Field Summary
Fields Modifier and Type Field Description private Boolean
replace
private Float
range
private final List<SoundDefinition.Sound>
files
private final AbstractRegistrate<?>
owner
private final P
parent
private final String
name
private final BuilderCallback
callback
private final ResourceKey<out Registry<SoundEvent>>
registryKey
private final Multimap<ProviderType<out RegistrateTagsProvider<?>>, TagKey<?>>
tagsByType
private final LazyRegistryEntry<SoundEvent, SoundEvent>
safeSupplier
private final Boolean
isOptional
public final static SoundBuilder.Companion
Companion
-
Constructor Summary
Constructors Constructor Description SoundBuilder(AbstractRegistrate<?> owner, P parent, String name, BuilderCallback callback)
-
Method Summary
Modifier and Type Method Description final Boolean
getReplace()
final Unit
setReplace(Boolean replace)
final Float
getRange()
final Unit
setRange(Float range)
final List<SoundDefinition.Sound>
getFiles()
final String
subtitleKey(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)
SoundEvent
createEntry()
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()
-
-
-
-