continue;
}
IPowerReceptor ipr = ((IPowerReceptor)te);
IPowerProvider pp = ipr.getPowerProvider();
if(pp != null && pp.preConditions(ipr) && pp.getMinEnergyReceived() <= mj)
{
int mjUsed = Math.min(Math.min(pp.getMaxEnergyReceived(), mj), pp.getMaxEnergyStored() - (int)Math.floor(pp.getEnergyStored()));
pp.receiveEnergy(mjUsed, bp.orientation);
mj -= mjUsed;