Class SingleFluidStorage

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

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

This is a convenient specialization of SingleVariantStorage for fluids 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.

  • Constructor Details

    • SingleFluidStorage

      public SingleFluidStorage()
  • Method Details