Interface ExtractableStorage

All Known Subinterfaces:
CompositeAwareChild, CompositeStorage, ExternalStorageProvider, FuzzyRootStorage, LimitedStorage, RootStorage, SerializableStorage, Storage, StorageNetworkComponent, TrackedStorage
All Known Implementing Classes:
AbstractProxyStorage, CompositeStorageImpl, ExternalStorage, LimitedStorageImpl, NoopStorage, PlatformStorageNetworkComponent, PriorityStorage, RootStorageImpl, StateTrackedStorage, StorageImpl, com.refinedmods.refinedstorage.api.network.impl.storage.StorageNetworkComponentImpl, TrackedStorageImpl

@API(status=STABLE, since="2.0.0-milestone.1.2") public interface ExtractableStorage
Represents a storage that can be extracted from.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    extract(ResourceKey resource, long amount, Action action, Actor actor)
    Extracts a resource from a storage.
  • Method Details

    • extract

      long extract(ResourceKey resource, long amount, Action action, Actor actor)
      Extracts a resource from a storage.
      Parameters:
      resource - the resource, may not be null
      amount - the amount, must be larger than 0
      action - the mode of extraction
      actor - the source
      Returns:
      the amount extracted