mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-17 13:13:12 +01:00
29 lines
887 B
Java
29 lines
887 B
Java
package cofh.api.energy;
|
|
|
|
import net.minecraft.util.EnumFacing;
|
|
|
|
|
|
/**
|
|
* 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 IEnergyHandler {
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate);
|
|
|
|
}
|