This commit is contained in:
CovertJaguar 2013-06-25 20:25:03 -07:00
parent 73aa6260a6
commit 2d281c56d1

View file

@ -80,19 +80,23 @@ public final class PowerProvider {
} }
private void applyPerdition() { private void applyPerdition() {
TileEntity tile = (TileEntity) receptor; if (powerLoss > 0) {
if (powerLoss > 0 && energyLossTracker.markTimeIfDelay(tile.worldObj, powerLossRegularity)) { TileEntity tile = (TileEntity) receptor;
energyStored -= powerLoss; if (energyLossTracker.markTimeIfDelay(tile.worldObj, powerLossRegularity)) {
if (energyStored < 0) { energyStored -= powerLoss;
energyStored = 0; if (energyStored < 0) {
energyStored = 0;
}
} }
} }
} }
private void applyWork() { private void applyWork() {
TileEntity tile = (TileEntity) receptor; if (energyStored >= minActivationEnergy) {
if (energyStored >= minActivationEnergy && doWorkTracker.markTimeIfDelay(tile.worldObj, 1)) { TileEntity tile = (TileEntity) receptor;
receptor.doWork(this); if (doWorkTracker.markTimeIfDelay(tile.worldObj, 1)) {
receptor.doWork(this);
}
} }
} }