Fixed performance of Stirling Gen.

This commit is contained in:
CrazyPants committed 2014-05-26 00:00:45 +08:00
1 parent 9fc65d8c3b
commit c78a2b6da2
3 files changed
+4 -5

No files matched your search

@@ -325,7 +325,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
requiresClientSync |= processTasks(redstoneCheckPassed);
requiresClientSync |= (lastSyncPowerStored != storedEnergy && worldObj.getTotalWorldTime() % 5 == 0);
requiresClientSync |= (lastSyncPowerStored != storedEnergy && worldObj.getTotalWorldTime() % 10 == 0);
if(requiresClientSync) {
lastSyncPowerStored = storedEnergy;
@@ -254,9 +254,9 @@ public class TileCombustionGenerator extends AbstractMachineEntity implements IP
return false;
}
//once full, don't start again until we have drained 2 seconds worth of power to prevent
//once full, don't start again until we have drained 10 seconds worth of power to prevent
//flickering on and off constantly when powering a machine that draws less than this produces
if(inPause && storedEnergy >= (powerHandler.getMaxEnergyStored() - (fuel.powerPerCycle * 40))) {
if(inPause && storedEnergy >= (powerHandler.getMaxEnergyStored() - (fuel.powerPerCycle * 200))) {
return false;
}
inPause = false;
@@ -144,8 +144,7 @@ public class TileEntityStirlingGenerator extends AbstractMachineEntity implement
if(storedEnergy < powerHandler.getMaxEnergyStored()) {
storedEnergy += (ENERGY_PER_TICK * getEnergyMultiplier());
}
burnTime--;
needsUpdate = true;
burnTime--;
}
needsUpdate |= transmitEnergy();