Class InterfaceProxyExternalStorageProvider

java.lang.Object
com.refinedmods.refinedstorage.common.iface.InterfaceProxyExternalStorageProvider
All Implemented Interfaces:
com.refinedmods.refinedstorage.api.network.impl.node.iface.externalstorage.InterfaceExternalStorageProvider, ExternalStorageProvider, ExtractableStorage, InsertableStorage

public class InterfaceProxyExternalStorageProvider extends Object implements com.refinedmods.refinedstorage.api.network.impl.node.iface.externalstorage.InterfaceExternalStorageProvider
  • Constructor Details Link icon

    • InterfaceProxyExternalStorageProvider Link icon

      public InterfaceProxyExternalStorageProvider(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
  • Method Details Link icon

    • extract Link icon

      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 Link icon

      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
    • iterator Link icon

      public Iterator<ResourceAmount> iterator()
      Specified by:
      iterator in interface ExternalStorageProvider
    • getInterface Link icon

      @Nullable public com.refinedmods.refinedstorage.api.network.impl.node.iface.InterfaceNetworkNode getInterface()
      Specified by:
      getInterface in interface com.refinedmods.refinedstorage.api.network.impl.node.iface.externalstorage.InterfaceExternalStorageProvider