try
{
if ( d != null && proxy.isActive() )
{
IEnergyGrid energy = proxy.getEnergy();
double power = items.getStackSize();
if ( energy.extractAEPower( power, mode, PowerMultiplier.CONFIG ) > power - 0.01 )
{
if ( mode == Actionable.MODULATE )
return AEItemStack.create( d.addItems( items.getItemStack() ) );
return AEItemStack.create( d.simulateAdd( items.getItemStack() ) );
}