boolean newRedstone = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord) || worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord + 1, zCoord);
if (newRedstone != redstonePowered && grid != null)
{
if (energy > 0.001D)
{
getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.PROVIDE_POWER));
} else if (energy < maxEnergy)
{
getGrid().postEvent(new MENetworkPowerStorage(this, MENetworkPowerStorage.PowerEventType.REQUEST_POWER));
}
}
redstonePowered = newRedstone;
}