Files
Mekanism-Community-Edition/src/main/java/cofh/api/energy/IEnergyReceiver.java
T
Ben Spiers 84336ec4d1 Merge branch 'development' into 1.8.9
Huge merge with 202 conflicts, hopefully not *too* broken.
2016-03-18 04:24:19 +00:00

28 lines
1.0 KiB
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 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. */
int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate);
/** Returns the amount of energy currently stored. */
int getEnergyStored(EnumFacing from);
/** Returns the maximum amount of energy that can be stored. */
int getMaxEnergyStored(EnumFacing from);
}