Energy Storage - TCreopargh/CraftTweakerIntegration GitHub Wiki

The IEnergyStorage interface lets you manipulate an energy (FE or RF) storing item. You can get an instance of it by calling IItemStack#energy. Make sure to check if it is an energy storage before doing this!

Method Description
int receiveEnergy(int maxReceive, @Optional boolean simulate) Adds energy to the storage. Returns quantity of energy that was accepted.
int extractEnergy(int maxExtract, @Optional boolean simulate) Removes energy from the storage. Returns quantity of energy that was removed.
int getEnergyStored() Returns the amount of energy currently stored.
int getMaxEnergyStored() Returns the maximum amount of energy that can be stored.
boolean canExtract() Returns if this storage can have energy extracted.
boolean canReceive() Used to determine if this storage can receive energy.