Class ItemDefinition.Builder
java.lang.Object
fr.fidorial.item.ItemDefinition.Builder
- Enclosing class:
ItemDefinition
Assembles an
ItemDefinition.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()edit(Consumer<DataComponentEditor> editor) Describes what every stack of this item starts out looking like, through the same editorItemStack.edit(Consumer)hands out.reset(DataComponentType<?> type) set(DataComponentType<T> type, T value)
-
Method Details
-
edit
Describes what every stack of this item starts out looking like, through the same editorItemStack.edit(Consumer)hands out.- Parameters:
editor- given the editor this builder is filling in- Returns:
- this builder
- Since:
- 0.1.0
-
set
- Type Parameters:
T- the component's value type- Parameters:
type- the component to setvalue- the value- Returns:
- this builder
- Since:
- 0.1.0
-
reset
- Parameters:
type- the component to stop declaring- Returns:
- this builder
- Since:
- 0.1.0
-
build
- Returns:
- the assembled definition
- Since:
- 0.1.0
-