public static interface ItemStackGenerator.Builder extends ResettableBuilder<ItemStackGenerator,ItemStackGenerator.Builder>
BiConsumer
s that will be applied in order
to an ItemStackGenerator
. Normally, most all biconsumers can be
created from ItemStackBuilderPopulators
.Modifier and Type | Method and Description |
---|---|
ItemStackGenerator.Builder |
add(BiConsumer<ItemStack.Builder,Random> consumer)
Adds a new biconsumer in the current order.
|
ItemStackGenerator.Builder |
addAll(Collection<BiConsumer<ItemStack.Builder,Random>> collection)
Adds all the provided biconsumers from the provided collection.
|
ItemStackGenerator.Builder |
baseItem(ItemType itemType)
Sets the base
ItemType for the ItemStackGenerator . |
ItemStackGenerator |
build()
Creates a new
ItemStackGenerator with all of the added
BiConsumer s. |
from, reset
ItemStackGenerator.Builder add(BiConsumer<ItemStack.Builder,Random> consumer)
consumer
- The consumer that mutates an itemstack builderItemStackGenerator.Builder addAll(Collection<BiConsumer<ItemStack.Builder,Random>> collection)
collection
- The collection of consumer to addItemStackGenerator.Builder baseItem(ItemType itemType)
ItemType
for the ItemStackGenerator
. A
base type must be set to avoid issues.itemType
- The base item typeItemStackGenerator build()
ItemStackGenerator
with all of the added
BiConsumer
s.