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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
package gtPlusPlus.xmod.gregtech.loaders;
import java.util.HashSet;
import java.util.Set;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class RecipeGen_Fluorite extends RecipeGen_Base {
public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
static {
MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
}
public RecipeGen_Fluorite(final Material material){
this.toGenerate = material;
mRecipeGenMap.add(this);
/**
* Shaped Crafting
*/
RecipeUtils.addShapedRecipe(
CI.craftingToolHammer_Hard, null, null,
material.getCrushedPurified(1), null, null,
null, null, null,
material.getDustPurified(1));
RecipeUtils.addShapedRecipe(
CI.craftingToolHammer_Hard, null, null,
material.getCrushed(1), null, null,
null, null, null,
material.getDustImpure(1));
RecipeUtils.addShapedRecipe(
CI.craftingToolHammer_Hard, null, null,
material.getCrushedCentrifuged(1), null, null,
null, null, null,
material.getDust(1));
final ItemStack normalDust = material.getDust(1);
final ItemStack smallDust = material.getSmallDust(1);
final ItemStack tinyDust = material.getTinyDust(1);
if (RecipeUtils.addShapedRecipe(
tinyDust, tinyDust, tinyDust,
tinyDust, tinyDust, tinyDust,
tinyDust, tinyDust, tinyDust,
normalDust)){
Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
if (RecipeUtils.addShapedRecipe(
normalDust, null, null,
null, null, null,
null, null, null,
material.getTinyDust(9))){
Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success");
}
else {
Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed");
}
if (RecipeUtils.addShapedRecipe(
smallDust, smallDust, null,
smallDust, smallDust, null,
null, null, null,
normalDust)){
Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
if (RecipeUtils.addShapedRecipe(
null, normalDust, null,
null, null, null,
null, null, null,
material.getSmallDust(4))){
Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
}
else {
Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
}
@Override
public void run() {
generateRecipes(this.toGenerate);
}
public static void generateRecipes(final Material material){
int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier);
final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1);
ItemStack tinyDustA = FLUORIDES.FLUORITE.getTinyDust(1);
ItemStack tinyDustB = FLUORIDES.FLUORITE.getTinyDust(1);
ItemStack matDust = FLUORIDES.FLUORITE.getDust(1);
ItemStack matDustA = FLUORIDES.FLUORITE.getDust(1);
/**
* Package
*/
//Allow ore dusts to be packaged
if (ItemUtils.checkForInvalidItems(material.getSmallDust(1)) && ItemUtils.checkForInvalidItems(material.getTinyDust(1))) {
RecipeGen_DustGeneration.generatePackagerRecipes(material);
}
/**
* Macerate
*/
//Macerate ore to Crushed
if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){
Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'");
}
//Macerate Centrifuged to Pure Dust
if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{matDust, matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'");
}
if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), (int) Math.min(5000L, Math.abs(material.getMass() * 20L)), material.getCrushedCentrifuged(1), tinyDustA, dustStone)){
Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustA.getDisplayName()+", "+dustStone.getDisplayName()+".");
}
GT_Values.RA.addChemicalBathRecipe(
FLUORIDES.FLUORITE.getCrushed(2),
FluidUtils.getFluidStack("hydrogen", 2000),
FLUORIDES.FLUORITE.getCrushedPurified(8),
FLUORIDES.FLUORITE.getDustImpure(4),
FLUORIDES.FLUORITE.getDustPurified(2),
new int[] { 10000, 5000, 1000 },
30 * 20,
240);
/**
* Forge Hammer
*/
if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){
Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'");
}
/**
* Centrifuge
*/
//Purified Dust to Clean
if (GT_Values.RA.addCentrifugeRecipe(
material.getDustPurified(1), null,
null, //In Fluid
null, //Out Fluid
matDust, tinyDustA,null,
null, null,null,
new int[]{10000, 10000}, //Chances
(int) Math.max(1L, material.getMass() * 8L), //Time
tVoltageMultiplier/2)){ //Eu
Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust");
}
//Impure Dust to Clean
if (GT_Values.RA.addCentrifugeRecipe(
material.getDustImpure(1), null,
null, //In Fluid
null, //Out Fluid
matDust, tinyDustB,null,
null, null,null,
new int[]{10000, 10000}, //Chances
(int) Math.max(1L, material.getMass() * 8L), //Time
tVoltageMultiplier/2)){ //Eu
Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust");
}
// CaF2 + H2SO4 → CaSO4(solid) + 2 HF
FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 16000);
if (aGregtechHydro == null) {
aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid", 16000);
}
CORE.RA.addDehydratorRecipe(
new ItemStack[] {
CI.getNumberedAdvancedCircuit(5),
FLUORIDES.FLUORITE.getDust(37),
},
FluidUtils.getFluidStack("sulfuricacid", 8000),
aGregtechHydro, // Fluid output (slot 2)
new ItemStack[] {
ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumSulfate", 15),
ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 2)
},
new int[] { 10000, 1000, 1000, 3000, 2000 },
10 * 60 * 20,
240); // EU
}
}
|