2013-04-13 16:35:13 +02:00
|
|
|
package ic2.api.energy.tile;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allows a tile entity (mostly a generator) to emit energy.
|
2013-08-22 17:36:31 +02:00
|
|
|
*
|
|
|
|
* See ic2/api/energy/usage.txt for an overall description of the energy net api.
|
2013-04-13 16:35:13 +02:00
|
|
|
*/
|
|
|
|
public interface IEnergySource extends IEnergyEmitter {
|
|
|
|
/**
|
2013-08-22 17:36:31 +02:00
|
|
|
* Energy output provided by the source this tick.
|
|
|
|
* This is typically Math.min(stored energy, max output/tick).
|
2013-04-13 16:35:13 +02:00
|
|
|
*
|
2013-08-22 17:36:31 +02:00
|
|
|
* @return Energy offered this tick
|
2013-04-13 16:35:13 +02:00
|
|
|
*/
|
2013-08-22 17:36:31 +02:00
|
|
|
double getOfferedEnergy();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw energy from this source's buffer.
|
|
|
|
*
|
|
|
|
* If the source doesn't have a buffer, this is a no-op.
|
|
|
|
*
|
2013-08-30 00:57:13 +02:00
|
|
|
* @param amount amount of EU to draw, may be negative
|
2013-08-22 17:36:31 +02:00
|
|
|
*/
|
|
|
|
void drawEnergy(double amount);
|
2013-04-13 16:35:13 +02:00
|
|
|
}
|
|
|
|
|