Restrict Thermal Evaporation Plant output to needed
This commit is contained in:
parent
50693e27d2
commit
3462baf761
1 changed files with 2 additions and 0 deletions
|
@ -111,10 +111,12 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
|
|||
{
|
||||
int outputNeeded = outputTank.getCapacity()-outputTank.getFluidAmount();
|
||||
int inputStored = inputTank.getFluidAmount();
|
||||
double outputRatio = (double)recipe.recipeOutput.output.amount/(double)recipe.recipeInput.ingredient.amount;
|
||||
|
||||
double tempMult = Math.max(0, getTemperature())*general.evaporationTempMultiplier;
|
||||
double inputToUse = (tempMult*recipe.recipeInput.ingredient.amount)*((float)height/(float)MAX_HEIGHT);
|
||||
inputToUse = Math.min(inputTank.getFluidAmount(), inputToUse);
|
||||
inputToUse = Math.min(inputToUse, outputNeeded/outputRatio);
|
||||
|
||||
lastGain = (float)inputToUse/(float)recipe.recipeInput.ingredient.amount;
|
||||
partialInput += inputToUse;
|
||||
|
|
Loading…
Reference in a new issue