aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/oreprocessing/ProcessingDirty.java
blob: 571b3d1a7f13536dc2da25a7bfbf03ac9bd110ac (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package gregtech.loaders.oreprocessing;

import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;

public class ProcessingDirty implements gregtech.api.interfaces.IOreRecipeRegistrator {

    public ProcessingDirty() {
        OrePrefixes.clump.add(this);
        OrePrefixes.shard.add(this);
        OrePrefixes.crushed.add(this);
        OrePrefixes.dirtyGravel.add(this);
    }

    @Override
    public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName,
        net.minecraft.item.ItemStack aStack) {
        GT_Values.RA.addForgeHammerRecipe(
            GT_Utility.copyAmount(1L, aStack),
            GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial.mMacerateInto, 1L),
            10,
            16);
        GT_ModHandler.addPulverisationRecipe(
            GT_Utility.copyAmount(1L, aStack),
            GT_OreDictUnificator.get(
                OrePrefixes.dustImpure,
                aMaterial.mMacerateInto,
                GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
                1L),
            GT_OreDictUnificator.get(
                OrePrefixes.dust,
                GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts),
                1L),
            10,
            false);
        GT_ModHandler.addOreWasherRecipe(
            GT_Utility.copyAmount(1L, aStack),
            new int[] { 10000, 1111, 10000 },
            1000,
            GT_OreDictUnificator.get(
                aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                aMaterial,
                1L),
            GT_OreDictUnificator.get(
                OrePrefixes.dust,
                GT_Utility.selectItemInList(0, aMaterial.mMacerateInto, aMaterial.mOreByProducts),
                1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L));
        GT_ModHandler.addThermalCentrifugeRecipe(
            GT_Utility.copyAmount(1L, aStack),
            new int[] { 10000, 1111, 10000 },
            (int) Math.min(5000L, Math.abs(aMaterial.getMass() * 20L)),
            GT_OreDictUnificator
                .get(aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedCentrifuged : OrePrefixes.dust, aMaterial, 1L),
            GT_OreDictUnificator.get(
                OrePrefixes.dust,
                GT_Utility.selectItemInList(1, aMaterial.mMacerateInto, aMaterial.mOreByProducts),
                1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L));

        if (aMaterial.contains(SubTag.WASHING_MERCURY)) GT_Values.RA.addChemicalBathRecipe(
            GT_Utility.copyAmount(1L, aStack),
            Materials.Mercury.getFluid(1000L),
            GT_OreDictUnificator.get(
                aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                aMaterial,
                1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
            new int[] { 10000, 7000, 4000 },
            800,
            8);
        if (aMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) GT_Values.RA.addChemicalBathRecipe(
            GT_Utility.copyAmount(1L, aStack),
            Materials.Mercury.getFluid(1000L),
            GT_OreDictUnificator.get(
                aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                aMaterial,
                1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
            new int[] { 10000, 9900, 4000 },
            800,
            8);
        if (aMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) GT_Values.RA.addChemicalBathRecipe(
            GT_Utility.copyAmount(1L, aStack),
            Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L),
            GT_OreDictUnificator.get(
                aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                aMaterial,
                1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L),
            GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
            new int[] { 10000, 7000, 4000 },
            800,
            8);
        for (Materials tMaterial : aMaterial.mOreByProducts) {
            if (tMaterial.contains(SubTag.WASHING_MERCURY)) GT_Values.RA.addChemicalBathRecipe(
                GT_Utility.copyAmount(1L, aStack),
                Materials.Mercury.getFluid(1000L),
                GT_OreDictUnificator.get(
                    aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                    aMaterial,
                    1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
                new int[] { 10000, 7000, 4000 },
                800,
                8);
            if (tMaterial.contains(SubTag.WASHING_MERCURY_99_PERCENT)) GT_Values.RA.addChemicalBathRecipe(
                GT_Utility.copyAmount(1L, aStack),
                Materials.Mercury.getFluid(1000L),
                GT_OreDictUnificator.get(
                    aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                    aMaterial,
                    1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
                new int[] { 10000, 9900, 4000 },
                800,
                8);
            if (tMaterial.contains(SubTag.WASHING_SODIUMPERSULFATE)) GT_Values.RA.addChemicalBathRecipe(
                GT_Utility.copyAmount(1L, aStack),
                Materials.SodiumPersulfate.getFluid(GT_Mod.gregtechproxy.mDisableOldChemicalRecipes ? 1000L : 100L),
                GT_OreDictUnificator.get(
                    aPrefix == OrePrefixes.crushed ? OrePrefixes.crushedPurified : OrePrefixes.dustPure,
                    aMaterial,
                    1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial.mMacerateInto, 1L),
                GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L),
                new int[] { 10000, 7000, 4000 },
                800,
                8);
        }
    }
}