Recalcuation things.

This commit is contained in:
Ben Spiers 2015-03-21 19:44:17 +00:00
parent 83e41478e5
commit c323969c87
5 changed files with 21 additions and 3 deletions

View file

@ -414,7 +414,7 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
{
super.recalculateUpgradables(upgrade);
if(upgrade == Upgrade.SPEED || (upgradeableSecondaryEfficiency() && upgrade == Upgrade.ENERGY))
if(upgrade == Upgrade.SPEED || (upgradeableSecondaryEfficiency() && upgrade == Upgrade.GAS))
{
secondaryEnergyPerTick = MekanismUtils.getSecondaryEnergyPerTickMean(this, BASE_SECONDARY_ENERGY_PER_TICK);
}

View file

@ -219,9 +219,12 @@ public abstract class TileEntityBasicMachine<INPUT extends MachineInput<INPUT>,
{
case SPEED:
ticksRequired = MekanismUtils.getTicks(this, BASE_TICKS_REQUIRED);
case ENERGY: //and SPEED fall-through.
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
break;
case ENERGY:
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
maxEnergy = MekanismUtils.getMaxEnergy(this, BASE_MAX_ENERGY);
break;
default:
break;
}

View file

@ -476,9 +476,12 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
{
case SPEED:
ticksRequired = MekanismUtils.getTicks(this, BASE_TICKS_REQUIRED);
energyUsage = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_USAGE);
break;
case ENERGY:
energyUsage = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_USAGE);
maxEnergy = MekanismUtils.getMaxEnergy(this, BASE_MAX_ENERGY);
break;
default:
break;
}

View file

@ -467,12 +467,18 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
switch(upgrade)
{
case SPEED:
case GAS:
injectUsage = MekanismUtils.getSecondaryEnergyPerTickMean(this, BASE_INJECT_USAGE);
break;
case SPEED:
ticksRequired = MekanismUtils.getTicks(this, BASE_TICKS_REQUIRED);
energyUsage = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_USAGE);
injectUsage = MekanismUtils.getSecondaryEnergyPerTickMean(this, BASE_INJECT_USAGE);
break;
case ENERGY:
energyUsage = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_USAGE);
maxEnergy = MekanismUtils.getMaxEnergy(this, BASE_MAX_ENERGY);
break;
default:
break;
}

View file

@ -1034,12 +1034,18 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
switch(upgrade)
{
case GAS:
secondaryEnergyPerTick = getSecondaryEnergyPerTick(recipeType);
break;
case SPEED:
ticksRequired = MekanismUtils.getTicks(this, BASE_TICKS_REQUIRED);
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
secondaryEnergyPerTick = getSecondaryEnergyPerTick(recipeType);
break;
case ENERGY:
energyPerTick = MekanismUtils.getEnergyPerTick(this, BASE_ENERGY_PER_TICK);
maxEnergy = MekanismUtils.getMaxEnergy(this, BASE_MAX_ENERGY);
break;
default:
break;
}