aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/api/recipe/ExtremeHeatExchangerRecipe.java
blob: 4a32e882f8cb376bda3c417a3abaa6f02c2a962c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package goodgenerator.api.recipe;

import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;

import gregtech.api.util.GT_Recipe;

public class ExtremeHeatExchangerRecipe extends GT_Recipe {

    public ExtremeHeatExchangerRecipe(FluidStack[] input, FluidStack[] output, int special) {
        super(false, null, null, null, null, input, output, 0, 0, special);
    }

    public int getMaxHotFluidConsume() {
        if (this.mFluidInputs != null) {
            return this.mFluidInputs[0].amount;
        }
        return 0;
    }

    public Fluid getNormalSteam() {
        if (this.mFluidOutputs != null) {
            return this.mFluidOutputs[0].getFluid();
        }
        return null;
    }

    public Fluid getHeatedSteam() {
        if (this.mFluidOutputs != null) {
            return this.mFluidOutputs[1].getFluid();
        }
        return null;
    }

    public Fluid getCooledFluid() {
        if (this.mFluidOutputs != null) {
            return this.mFluidOutputs[2].getFluid();
        }
        return null;
    }

    public int getEUt() {
        if (getNormalSteam() != null) {
            switch (getNormalSteam().getName()) {
                case "steam": {
                    int tVal = this.mFluidInputs[1].amount * 4;
                    if (tVal < 0) tVal = -tVal;
                    return tVal;
                }
                case "ic2superheatedsteam": {
                    int tVal = this.mFluidInputs[1].amount * 8;
                    if (tVal < 0) tVal = -tVal;
                    return tVal;
                }
                case "supercriticalsteam": {
                    int tVal = this.mFluidInputs[1].amount * 800;
                    if (tVal < 0) tVal = -tVal;
                    return tVal;
                }
                default:
                    return 0;
            }
        }
        return 0;
    }
}