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

39 lines
1.1 KiB
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 receive energy, generally storing it in one or more internal {@link IEnergyStorage} objects.
* <p>
* A reference implementation is provided {@link TileEnergyHandler}.
*
* @author King Lemming
*
*/
public interface IEnergyReceiver extends IEnergyConnection {
/**
* Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
*
* @param from
* Orientation the energy is received from.
* @param maxReceive
* Maximum amount of energy to receive.
* @param simulate
* If TRUE, the charge will only be simulated.
* @return Amount of energy that was (or would have been, if simulated) received.
*/
2016-01-07 18:20:59 +01:00
int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate);
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
}