Interface EnergyStorage

All Known Implementing Classes:
com.refinedmods.refinedstorage.api.network.impl.energy.AbstractListeningEnergyStorage, com.refinedmods.refinedstorage.api.network.impl.energy.AbstractProxyEnergyStorage, BlockEntityEnergyStorage, CreativeEnergyStorage, ItemBlockEnergyStorage, ItemEnergyStorage

@API(status=STABLE, since="2.0.0-milestone.1.0") public interface EnergyStorage
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    extract(long amount, Action action)
    Extracts energy from the energy storage.
    long
     
    long
     
    long
    receive(long amount, Action action)
    Adds energy to the energy storage.
  • Method Details

    • getStored

      long getStored()
      Returns:
      the amount stored
    • getCapacity

      long getCapacity()
      Returns:
      the capacity
    • receive

      long receive(long amount, Action action)
      Adds energy to the energy storage.
      Parameters:
      amount - the amount of energy to be received
      action - the action
      Returns:
      the amount received
    • extract

      long extract(long amount, Action action)
      Extracts energy from the energy storage.
      Parameters:
      amount - the amount of energy to be extracted
      action - the action
      Returns:
      the amount extracted