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
|
package gtnhlanth.common.tileentity.recipe.beamline;
import java.util.Arrays;
import java.util.HashMap;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import gtPlusPlus.core.material.MaterialsElements;
import gtnhlanth.common.beamline.Particle;
import gtnhlanth.common.item.MaskList;
import gtnhlanth.common.register.LanthItemList;
import gtnhlanth.common.register.WerkstoffMaterialPool;
public class BeamlineRecipeLoader {
public static final HashMap<String, Fluid> coolantMap = new HashMap<>();
private static final ItemList[] VIABLE_WAFERS = new ItemList[] { ItemList.Circuit_Silicon_Wafer,
ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4,
ItemList.Circuit_Silicon_Wafer5, ItemList.Circuit_Silicon_Wafer6, ItemList.Circuit_Silicon_Wafer7 };
public static void load() {
/*
* Coolant list
*/
coolantMap.put(
Materials.LiquidNitrogen.getGas(1L)
.getFluid()
.getName(),
Materials.Nitrogen.getGas(1L)
.getFluid());
coolantMap.put(
Materials.LiquidOxygen.getGas(1L)
.getFluid()
.getName(),
Materials.Oxygen.getGas(1L)
.getFluid());
coolantMap.put("ic2coolant", FluidRegistry.getFluid("ic2hotcoolant"));
coolantMap.put(
Materials.SuperCoolant.getFluid(1L)
.getFluid()
.getName(),
Materials.Water.getFluid(1L)
.getFluid());
/*
* ELECTRON
*/
BeamlineRecipeAdder2.instance.addSourceChamberRecipe(
new ItemStack[] { GTOreDictUnificator.get(OrePrefixes.stick, Materials.Tungsten, 1) },
null,
Particle.ELECTRON.ordinal(),
20,
1000,
98,
0.1f,
7680);
BeamlineRecipeAdder2.instance.addSourceChamberRecipe(
new ItemStack[] { WerkstoffMaterialPool.LanthanumHexaboride.get(OrePrefixes.stickLong, 1) },
null,
Particle.ELECTRON.ordinal(),
60,
5000,
99,
0.3f,
7680);
/*
* NEUTRON
*/
BeamlineRecipeAdder2.instance.addSourceChamberRecipe(
new ItemStack[] { MaterialsElements.getInstance().CALIFORNIUM.getDust(1) },
null,
Particle.NEUTRON.ordinal(),
10,
9000,
95,
999,
1920);
/*
* ALPHA
*/
BeamlineRecipeAdder2.instance.addSourceChamberRecipe(
new ItemStack[] { Materials.Uranium.getDust(1) },
new ItemStack[] { WerkstoffMaterialPool.Thorium234.get(OrePrefixes.dust, 1) },
Particle.ALPHA.ordinal(),
1,
4270,
90,
999,
480);
/*
* TARGET CHAMBER
*/
for (MaskList mask : MaskList.values()) {
if (mask.getProducedItem() == null) // Blank or error
continue;
int index = 0;
for (ItemList wafer : VIABLE_WAFERS) {
index++;
if (!Arrays.asList(mask.getForbiddenWafers())
.contains(wafer)) {
BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
wafer.get(1),
GTUtility.copyAmountUnsafe((int) Math.pow(2, index + 2), mask.getProducedItem()),
new ItemStack(LanthItemList.maskMap.get(mask), 0),
1,
mask.getBaselineAmount() * (int) Math.pow(Math.sqrt(3), index - 1), // 3x recipe amount increase
// per 2 increases in wafer
// tier. This greatly
// incentivises the use of
// higher tier boule wafer
// recipes
mask.getMinEnergy(),
mask.getMaxEnergy(),
mask.getMinFocus(),
1,
1920);
}
}
/*
* if (!Arrays.asList(MaskList.CPU.getForbiddenWafers()).contains(wafer)) {
* BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1), GT_Utility.copyAmountUnsafe((int)
* Math.pow(2, index + 2), ItemList.Circuit_Wafer_CPU.get(1)), //Varies new
* ItemStack(LanthItemList.maskMap.get(MaskList.CPU), 0), // Varies 0, 10 * (int) Math.pow(2, index - 1), //
* Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); } /* PPIC
*/
/*
* if (!Arrays.asList(MaskList.PPIC.getForbiddenWafers()).contains(wafer)) {
* GTLog.out.print("Adding recipe for PPIC with " + wafer.get(1).getUnlocalizedName() + " amount: " + 40 *
* (int) Math.pow(2, index - 1)); BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1),
* ItemList.Circuit_Wafer_PPIC.get((int) Math.pow(2, index + 2)), //Varies new
* ItemStack(LanthItemList.maskMap.get(MaskList.PPIC), 0), // Varies 0, 40 * (int) Math.pow(2, index - 1),
* // Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); }
*/
}
/*
* BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new
* ItemStack(Items.diamond, 1), null, 1, 20, 100, 1000, 60, 1, 1920);
* BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new
* ItemStack(Items.cooked_chicken, 1), null, 1, 20, 1, 10, 60, 1, 1920);
*/
BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
new ItemStack(Items.chicken, 1),
new ItemStack(Items.cooked_chicken),
null,
Particle.PHOTON.ordinal(),
400,
5,
20,
80,
1,
7864320);
BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
new ItemStack(Items.chicken, 1),
new ItemStack(Items.egg),
null,
Particle.PHOTON.ordinal(),
400,
21,
600,
80,
1,
7864320);
}
}
|