Class ItemStack.Builder
java.lang.Object
fr.fidorial.item.ItemStack.Builder
- Enclosing class:
ItemStack
-
Method Summary
Modifier and TypeMethodDescriptionbuild()count(int newCount) edit(Consumer<DataComponentEditor> editor) Everything past the identifier and the count is described here, so there is one place to learn rather than three that drift apart.remove(DataComponentType<?> type) reset(DataComponentType<?> type) set(DataComponentType<T> type, T value)
-
Method Details
-
count
- Parameters:
newCount- how many- Returns:
- this builder
-
edit
Everything past the identifier and the count is described here, so there is one place to learn rather than three that drift apart.- 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
-
remove
- Parameters:
type- the component whose default to remove- Returns:
- this builder
-
reset
- Parameters:
type- the component to stop patching- Returns:
- this builder
- Since:
- 0.1.0
-
build
- Returns:
- the built stack
-