public interface IEnergyReceiver extends IEnergyConnection
IEnergyStorage
objects.
A reference implementation is provided TileEnergyHandler
.
Modifier and Type | Method and Description |
---|---|
int |
getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the amount of energy currently stored.
|
int |
getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
Returns the maximum amount of energy that can be stored.
|
int |
receiveEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxReceive,
boolean simulate)
Add energy to an IEnergyReceiver, internal distribution is left entirely to the IEnergyReceiver.
|
canConnectEnergy
int receiveEnergy(net.minecraftforge.common.util.ForgeDirection from, int maxReceive, boolean simulate)
from
- Orientation the energy is received from.maxReceive
- Maximum amount of energy to receive.simulate
- If TRUE, the charge will only be simulated.int getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)