@@ -40,12 +40,20 @@ public static void register() {
40
40
wirePrefix .addProcessingHandler (IngotMaterial .class , WireRecipeHandler ::generateWireRecipe );
41
41
wirePrefix .addProcessingHandler (Material .class , WireRecipeHandler ::generateWireCombiningRecipe );
42
42
}
43
+
44
+ for (OrePrefix cablePrefix : CABLE_DOUBLING_ORDER ) {
45
+ cablePrefix .addProcessingHandler (Material .class , WireRecipeHandler ::generateCableCombiningRecipe );
46
+ }
43
47
}
44
48
45
49
private static final OrePrefix [] WIRE_DOUBLING_ORDER = new OrePrefix []{
46
50
OrePrefix .wireGtSingle , OrePrefix .wireGtDouble , OrePrefix .wireGtQuadruple , OrePrefix .wireGtOctal , OrePrefix .wireGtHex
47
51
};
48
52
53
+ private static final OrePrefix [] CABLE_DOUBLING_ORDER = new OrePrefix []{
54
+ OrePrefix .cableGtSingle , OrePrefix .cableGtDouble , OrePrefix .cableGtQuadruple , OrePrefix .cableGtOctal , OrePrefix .cableGtHex
55
+ };
56
+
49
57
public static void processWireSingle (OrePrefix wirePrefix , IngotMaterial material ) {
50
58
RecipeMaps .EXTRUDER_RECIPES .recipeBuilder ()
51
59
.input (OrePrefix .ingot , material )
@@ -135,6 +143,41 @@ public static void generateWireCombiningRecipe(OrePrefix wirePrefix, Material ma
135
143
OreDictUnifier .get (WIRE_DOUBLING_ORDER [wireIndex - 1 ], material , 2 ),
136
144
new UnificationEntry (wirePrefix , material ));
137
145
}
146
+
147
+ if (wireIndex < 3 ) {
148
+ ModHandler .addShapelessRecipe (String .format ("%s_wire_%s_quadrupling" , material , wirePrefix ),
149
+ OreDictUnifier .get (WIRE_DOUBLING_ORDER [wireIndex + 2 ], material ),
150
+ new UnificationEntry (wirePrefix , material ),
151
+ new UnificationEntry (wirePrefix , material ),
152
+ new UnificationEntry (wirePrefix , material ),
153
+ new UnificationEntry (wirePrefix , material ));
154
+ }
155
+ }
156
+
157
+ public static void generateCableCombiningRecipe (OrePrefix cablePrefix , Material material ) {
158
+ int cableIndex = ArrayUtils .indexOf (CABLE_DOUBLING_ORDER , cablePrefix );
159
+
160
+ if (cableIndex < CABLE_DOUBLING_ORDER .length - 1 ) {
161
+ ModHandler .addShapelessRecipe (String .format ("%s_cable_%s_doubling" , material , cablePrefix ),
162
+ OreDictUnifier .get (CABLE_DOUBLING_ORDER [cableIndex + 1 ], material ),
163
+ new UnificationEntry (cablePrefix , material ),
164
+ new UnificationEntry (cablePrefix , material ));
165
+ }
166
+
167
+ if (cableIndex > 0 ) {
168
+ ModHandler .addShapelessRecipe (String .format ("%s_cable_%s_splitting" , material , cablePrefix ),
169
+ OreDictUnifier .get (CABLE_DOUBLING_ORDER [cableIndex - 1 ], material , 2 ),
170
+ new UnificationEntry (cablePrefix , material ));
171
+ }
172
+
173
+ if (cableIndex < 3 ) {
174
+ ModHandler .addShapelessRecipe (String .format ("%s_cable_%s_quadrupling" , material , cablePrefix ),
175
+ OreDictUnifier .get (CABLE_DOUBLING_ORDER [cableIndex + 2 ], material ),
176
+ new UnificationEntry (cablePrefix , material ),
177
+ new UnificationEntry (cablePrefix , material ),
178
+ new UnificationEntry (cablePrefix , material ),
179
+ new UnificationEntry (cablePrefix , material ));
180
+ }
138
181
}
139
182
140
183
private static int getMaterialAmount (int cableTier , int insulationTier ) {
0 commit comments