Large Heat Exchanger water/steam ratio
* Ratio now 1:160 (perfect) * Now use useWater properly as intended * NOT using math.Round() or math.Floor()
This commit is contained in:
parent
95607cae55
commit
8e15794c0a
1 changed files with 20 additions and 10 deletions
|
@ -121,18 +121,28 @@ public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBloc
|
||||||
return usage;
|
return usage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onRunningTick(ItemStack aStack)
|
public boolean onRunningTick(ItemStack aStack) {
|
||||||
{
|
|
||||||
if (this.mEUt > 0)
|
if (this.mEUt > 0) {
|
||||||
{
|
int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate.
|
||||||
int tGeneratedEU = (int)(this.mEUt * 2L * this.mEfficiency / 10000L);
|
|
||||||
if (tGeneratedEU > 0) {
|
if (tGeneratedEU > 0) {
|
||||||
if (depleteInput(GT_ModHandler.getDistilledWater(useWater(((float)(superheated ? tGeneratedEU/2 :tGeneratedEU) + 160f) / 160f)))) {
|
if (superheated)
|
||||||
if(superheated){addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU/2));
|
tGeneratedEU /= 2; // We produce half as much superheated steam if necessary
|
||||||
}else{
|
|
||||||
addOutput(GT_ModHandler.getSteam(tGeneratedEU));}
|
int distilledConsumed = useWater(tGeneratedEU / 160f); // how much distilled water to consume
|
||||||
|
tGeneratedEU = distilledConsumed * 160; // EXACTLY how much steam to generate, producing a perfect 1:160 ratio with distilled water consumption
|
||||||
|
|
||||||
|
FluidStack distilledStack = GT_ModHandler.getDistilledWater(distilledConsumed);
|
||||||
|
if (depleteInput(distilledStack)) // Consume the distilled water
|
||||||
|
{
|
||||||
|
if (superheated) {
|
||||||
|
addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", tGeneratedEU)); // Generate superheated steam
|
||||||
} else {
|
} else {
|
||||||
explodeMultiblock();
|
addOutput(GT_ModHandler.getSteam(tGeneratedEU)); // Generate regular steam
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
explodeMultiblock(); // Generate crater
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue