public interface IEnergyHandler extends IEnergyConnection
IEnergyStorage objects.
A reference implementation is provided TileEnergyHandler.| Modifier and Type | Method and Description |
|---|---|
int |
extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
Remove energy from an IEnergyHandler, internal distribution is left entirely to the IEnergyHandler.
|
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 IEnergyHandler, internal distribution is left entirely to the IEnergyHandler.
|
canConnectEnergyint 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 extractEnergy(net.minecraftforge.common.util.ForgeDirection from,
int maxExtract,
boolean simulate)
from - Orientation the energy is extracted from.maxExtract - Maximum amount of energy to extract.simulate - If TRUE, the extraction will only be simulated.int getEnergyStored(net.minecraftforge.common.util.ForgeDirection from)
int getMaxEnergyStored(net.minecraftforge.common.util.ForgeDirection from)