Restrict Thermal Evaporation Plant output to needed

This commit is contained in:
aidancbrady 2016-07-23 23:11:32 -04:00
parent 50693e27d2
commit 3462baf761

View file

@ -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;