public interface ItemStackBuilder
ItemStack
.Modifier and Type | Method and Description |
---|---|
ItemStack |
build()
Builds an instance of an ItemStack.
|
ItemStackBuilder |
fromItemStack(ItemStack itemStack)
Sets all the settings in this builder from the item stack blueprint.
|
ItemStackBuilder |
itemData(DataManipulator<?,?> itemData)
Sets the
DataManipulator to add to the ItemStack . |
ItemStackBuilder |
itemData(ImmutableDataManipulator<?,?> itemData)
Sets the
ImmutableDataManipulator to add to the
ItemStack . |
ItemStackBuilder |
itemType(ItemType itemType)
Sets the
ItemType of the item stack. |
ItemStackBuilder |
quantity(int quantity)
Sets the quantity of the item stack.
|
ItemStackBuilder |
reset()
Resets all information regarding the item stack to be created.
|
ItemStackBuilder itemType(ItemType itemType)
ItemType
of the item stack.itemType
- The type of itemItemStackBuilder quantity(int quantity) throws IllegalArgumentException
quantity
- The quantity of the item stackIllegalArgumentException
- If the quantity is outside the allowed boundsItemStackBuilder itemData(DataManipulator<?,?> itemData) throws IllegalArgumentException
DataManipulator
to add to the ItemStack
.itemData
- The item data to setIllegalArgumentException
- If the item data is incompatible with the itemItemStackBuilder itemData(ImmutableDataManipulator<?,?> itemData) throws IllegalArgumentException
ImmutableDataManipulator
to add to the
ItemStack
.itemData
- The item data to setIllegalArgumentException
- If the item data is incompatibleItemStackBuilder fromItemStack(ItemStack itemStack)
itemStack
- The item stack to copyItemStackBuilder reset()
ItemStack build() throws IllegalStateException
IllegalStateException
- If the item stack is not completed