ActuallyAdditions/src/main/java/cofh/api/energy/IEnergyHandler.java

28 lines
703 B
Java
Raw Normal View History

2015-07-15 00:19:44 +02:00
package cofh.api.energy;
2016-01-07 18:20:59 +01:00
import net.minecraft.util.EnumFacing;
2015-07-15 00:19:44 +02:00
/**
* Implement this interface on Tile Entities which should handle energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
2016-02-16 21:49:44 +01:00
* <p>
* Note that {@link IEnergyReceiver} and {@link IEnergyProvider} are extensions of this.
2015-07-15 00:19:44 +02:00
*
* @author King Lemming
*
*/
2016-02-16 21:49:44 +01:00
public interface IEnergyHandler extends IEnergyConnection {
2015-07-15 00:19:44 +02:00
/**
* Returns the amount of energy currently stored.
*/
2016-01-07 18:20:59 +01:00
int getEnergyStored(EnumFacing from);
2015-07-15 00:19:44 +02:00
/**
* Returns the maximum amount of energy that can be stored.
*/
2016-01-07 18:20:59 +01:00
int getMaxEnergyStored(EnumFacing from);
2015-07-15 00:19:44 +02:00
}