Interface ItemStackSnapshot
- 
- All Superinterfaces:
- CopyableDataHolder,- DataHolder,- DataHolder.Immutable<ItemStackSnapshot>,- DataSerializable,- HoverEventSource<HoverEvent.ShowItem>,- SerializableDataHolder,- SerializableDataHolder.Immutable<ItemStackSnapshot>,- ValueContainer
 
 public interface ItemStackSnapshot extends HoverEventSource<HoverEvent.ShowItem>, SerializableDataHolder.Immutable<ItemStackSnapshot> Represents a snapshot of anItemStackas anDataHolder.Immutableto represent all of the data associated with theItemStackof which the snapshot was created from. Being that it is a snapshot, a snapshot cannot be modified, but modifications will result in a new instance of theItemStackSnapshot.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceItemStackSnapshot.Factory- 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.DataHolderDataHolder.Immutable<I extends DataHolder.Immutable<I>>, DataHolder.Mutable
 - 
Nested classes/interfaces inherited from interface org.spongepowered.api.data.SerializableDataHolderSerializableDataHolder.Immutable<I extends SerializableDataHolder.Immutable<I>>, SerializableDataHolder.Mutable
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description ItemStackcreateStack()Creates a newItemStackwith all the data currently available on thisItemStackSnapshot.static ItemStackSnapshotempty()Gets a emptyItemStackSnapshot.booleanisEmpty()Returns true ifquantity()is zero and therefore this ItemStackSnapshot is empty.intquantity()Gets the quantity of items in this theItemStackthisItemStackSnapshotis representing.ItemTypetype()Gets theItemTypeof thisItemStackSnapshot.- 
Methods inherited from interface org.spongepowered.api.data.DataHolder.ImmutablemergeWith, mergeWith, transform, transform, with, with, with, without, without, without
 - 
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersion, toContainer
 - 
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSourceasHoverEvent, asHoverEvent
 - 
Methods inherited from interface org.spongepowered.api.data.SerializableDataHoldervalidateRawData
 - 
Methods inherited from interface org.spongepowered.api.data.SerializableDataHolder.Immutablecopy, withRawData
 
- 
 
- 
- 
- 
Method Detail- 
emptystatic ItemStackSnapshot empty() Gets a emptyItemStackSnapshot.- Returns:
- The empty item stack snapshot
 
 - 
typeItemType type() - Returns:
- The item type
 
 - 
quantityint quantity() Gets the quantity of items in this theItemStackthisItemStackSnapshotis representing.- Returns:
- The current stack size
 
 - 
isEmptyboolean isEmpty() Returns true ifquantity()is zero and therefore this ItemStackSnapshot is empty.- Returns:
- True if this ItemStackSnapshot is empty
 
 - 
createStackItemStack createStack() Creates a newItemStackwith all the data currently available on thisItemStackSnapshot.- Returns:
- The newly generated item stack
 
 
- 
 
-