Class NoopStorage

java.lang.Object
com.refinedmods.refinedstorage.api.storage.NoopStorage
All Implemented Interfaces:
ExtractableStorage, InsertableStorage, Storage, StorageView

@API(status=STABLE, since="2.0.0-milestone.3.3") public class NoopStorage extends Object implements Storage
  • Constructor Details

    • NoopStorage

      public NoopStorage()
  • Method Details

    • extract

      public long extract(ResourceKey resource, long amount, Action action, Actor actor)
      Description copied from interface: ExtractableStorage
      Extracts a resource from a storage.
      Specified by:
      extract in interface ExtractableStorage
      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
    • insert

      public long insert(ResourceKey resource, long amount, Action action, Actor actor)
      Description copied from interface: InsertableStorage
      Inserts a resource into a storage.
      Specified by:
      insert in interface InsertableStorage
      Parameters:
      resource - the resource, may not be null
      amount - the amount, must be larger than 0
      action - the mode of insertion
      actor - the source
      Returns:
      the amount inserted
    • getAll

      public Collection<ResourceAmount> getAll()
      Specified by:
      getAll in interface StorageView
      Returns:
      a list of resource amounts
    • getStored

      public long getStored()
      Specified by:
      getStored in interface StorageView
      Returns:
      the amount stored