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
|
package gregtech.loaders.oreprocessing;
import static gregtech.api.util.GT_Utility.calculateRecipeEU;
import gregtech.api.enums.*;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
public class ProcessingGear implements gregtech.api.interfaces.IOreRecipeRegistrator {
public ProcessingGear() {
OrePrefixes.gearGt.add(this);
OrePrefixes.gearGtSmall.add(this);
}
@Override
public void registerOre(
OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
switch (aPrefix) {
case gearGt:
GT_ModHandler.removeRecipeByOutputDelayed(aStack);
if (aMaterial.mStandardMoltenFluid != null)
if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) {
GT_Values.RA.addFluidSolidifierRecipe(
ItemList.Shape_Mold_Gear.get(0L),
aMaterial.getMolten(576L),
GT_OreDictUnificator.get(aPrefix, aMaterial, 1L),
128,
calculateRecipeEU(aMaterial, 8));
}
if (aMaterial.mUnificatable
&& (aMaterial.mMaterialInto == aMaterial)
&& !aMaterial.contains(SubTag.NO_WORKING)) {
switch (aMaterial.mName) {
case "Wood":
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {
"SPS",
"PsP",
"SPS",
'P',
OrePrefixes.plank.get(aMaterial),
'S',
OrePrefixes.stick.get(aMaterial)
});
break;
case "Stone":
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {
"SPS",
"PfP",
"SPS",
'P',
OrePrefixes.stoneSmooth,
'S',
new ItemStack(Blocks.stone_button, 1, 32767)
});
break;
default:
if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) {
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {
"SPS",
"PwP",
"SPS",
'P',
OrePrefixes.plate.get(aMaterial),
'S',
OrePrefixes.stick.get(aMaterial)
});
}
}
}
break;
case gearGtSmall:
if (aMaterial.mStandardMoltenFluid != null)
if (!(aMaterial == Materials.AnnealedCopper || aMaterial == Materials.WroughtIron)) {
GT_Values.RA.addFluidSolidifierRecipe(
ItemList.Shape_Mold_Gear_Small.get(0L),
aMaterial.getMolten(144L),
GT_Utility.copyAmount(1L, aStack),
16,
calculateRecipeEU(aMaterial, 8));
}
if (aMaterial.mUnificatable
&& (aMaterial.mMaterialInto == aMaterial)
&& !aMaterial.contains(SubTag.NO_WORKING)) {
switch (aMaterial.mName) {
case "Wood":
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {"P ", " s", 'P', OrePrefixes.plank.get(aMaterial)});
break;
case "Stone":
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {"P ", " f", 'P', OrePrefixes.stoneSmooth});
break;
default:
if (aMaterial.getProcessingMaterialTierEU() < TierEU.IV) {
GT_ModHandler.addCraftingRecipe(
GT_OreDictUnificator.get(OrePrefixes.gearGtSmall, aMaterial, 1L),
GT_Proxy.tBits,
new Object[] {
" S ",
"hPx",
" S ",
'S',
OrePrefixes.stick.get(aMaterial),
'P',
OrePrefixes.plate.get(aMaterial)
});
}
}
}
break;
default:
break;
}
}
}
|