Class EventBuilder
-
- All Implemented Interfaces:
-
com.tterrag.registrate.builders.Builder
,com.tterrag.registrate.util.nullness.NonNullSupplier
,java.util.function.Supplier
public class EventBuilder<E extends BaseEvent, P extends Object> extends AbstractBuilder<BaseEvent, E, P, EventBuilder<E, P>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
EventBuilder.Companion
-
Field Summary
Fields Modifier and Type Field Description private String
localizedName
private final Function0<E>
event
private final AbstractRegistrate<?>
owner
private final P
parent
private final String
name
private final BuilderCallback
callback
private final ResourceKey<out Registry<BaseEvent>>
registryKey
private final Multimap<ProviderType<out RegistrateTagsProvider<?>>, TagKey<?>>
tagsByType
private final LazyRegistryEntry<BaseEvent, E>
safeSupplier
private final Boolean
isOptional
public final static EventBuilder.Companion
Companion
-
Constructor Summary
Constructors Constructor Description EventBuilder(AbstractRegistrate<?> owner, P parent, String name, BuilderCallback callback, Function0<E> event)
-
Method Summary
Modifier and Type Method Description final String
getLocalizedName()
final Unit
setLocalizedName(String localizedName)
final Function0<E>
getEvent()
final EventBuilder<E, P>
lang(String name)
E
createEntry()
RegistryEntry<BaseEvent, E>
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
-
getLocalizedName
final String getLocalizedName()
-
setLocalizedName
final Unit setLocalizedName(String localizedName)
-
lang
final EventBuilder<E, P> lang(String name)
-
createEntry
E createEntry()
-
-
-
-