public interface IEnergyProvider 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 IEnergyProvider, internal distribution is left entirely to the IEnergyProvider.
|
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.
|
canConnectEnergy
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)