Interface ModifyDefaultComponentsEvent.Initializer
- Enclosing class:
ModifyDefaultComponentsEvent
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A alternate version of
DataComponentInitializers.Initializer which receives the item whose components being initialized.-
Method Summary
Modifier and TypeMethodDescriptionReturns a composed initializer that first runs this initializer, and then runs the given initializer.voidrun(DataComponentMap.Builder components, HolderLookup.Provider context, Item item) Initializes or modifies the default components of a given item.
-
Method Details
-
run
Initializes or modifies the default components of a given item.- Parameters:
components- the default components of the itemcontext- the registry contextitem- the item
-
andThen
default ModifyDefaultComponentsEvent.Initializer andThen(ModifyDefaultComponentsEvent.Initializer other) Returns a composed initializer that first runs this initializer, and then runs the given initializer.- Parameters:
other- the initializer to apply after this initializer is run- Returns:
- a composed initializer that first runs this initializer, and then runs the given initializer
-