Interface IEnergyService

All Superinterfaces:
IEnergySource, IGridService

public interface IEnergyService extends IGridService, IEnergySource
AE's Power system.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
    double
     
    double
    getEnergyDemand(double maxRequired)
    Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to calculate the demand.
    double
    Return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
    double
    this is should be considered an estimate, and not relied upon for real calculations.
    double
    this is should be considered an estimate, and not relied upon for real calculations.
    double
    injectPower(double amt, Actionable mode)
    Inject power in the network.
    boolean
    AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation that determines the networks "powered state" if the network is considered off-line, your machines should not function.

    Methods inherited from interface appeng.api.networking.energy.IEnergySource

    extractAEPower
  • Method Details

    • getIdlePowerUsage

      double getIdlePowerUsage()
      Return the current calculated idle energy drain each tick, is used internally to drain power for each tick. It's the sum of the idle channel power usage and the idle usages of the machines in the network.
    • getChannelPowerUsage

      double getChannelPowerUsage()
      Returns:
      the current idle power usage of channels
    • getAvgPowerUsage

      double getAvgPowerUsage()
      Returns:
      the average power drain over the past 10 ticks, includes idle usage during this time, and all use of extractPower.
    • getAvgPowerInjection

      double getAvgPowerInjection()
      Returns:
      the average energy injected into the system per tick, for the last 10 ticks.
    • isNetworkPowered

      boolean isNetworkPowered()
      AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation that determines the networks "powered state" if the network is considered off-line, your machines should not function.

      Nodes are notified via IGridNodeListener.onStateChanged(T, appeng.api.networking.IGridNode, appeng.api.networking.IGridNodeListener.State) when this value changes. Most machines can simply test the value when they are about to perform work, without listening to this event.

      Returns:
      if the network is powered or not.
    • injectPower

      double injectPower(double amt, Actionable mode)
      Inject power in the network. Note that each network has some power storage even if there are no energy cells.
      Parameters:
      amt - power to inject into the network
      mode - should the action be simulated or performed?
      Returns:
      the amount of power that the network could not accept
    • getStoredPower

      double getStoredPower()
      this is should be considered an estimate, and not relied upon for real calculations.
      Returns:
      estimated available power.
    • getMaxStoredPower

      double getMaxStoredPower()
      this is should be considered an estimate, and not relied upon for real calculations.
      Returns:
      estimated available power.
    • getEnergyDemand

      double getEnergyDemand(double maxRequired)
      Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to calculate the demand.
      Returns:
      Amount of power required to charge the grid, in AE.