Class SingleItemStorage

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

@Experimental 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.

Experimental feature, we reserve the right to remove or change it without further notice. The transfer API is a complex addition, and we want to be able to correct possible design mistakes.