Class SingleItemStorage

All Implemented Interfaces:
Iterable<StorageView<ItemVariant>>, SingleSlotStorage<ItemVariant>, SlottedStorage<ItemVariant>, Storage<ItemVariant>, StorageView<ItemVariant>, TransactionContext.CloseCallback, TransactionContext.OuterCloseCallback

public abstract class SingleItemStorage extends SingleVariantStorage<ItemVariant>
A storage that can store a single item variant at any given time. Implementors should at least override getCapacity(ItemVariant), and probably SnapshotParticipant.onFinalCommit() as well for markDirty() and similar calls.

This is a convenient specialization of SingleVariantStorage for items that additionally offers methods to read the contents of the storage from NBT.