1
1
package com .jaquadro .minecraft .storagedrawers .integration .gtnh ;
2
2
3
3
import static com .jaquadro .minecraft .storagedrawers .StorageDrawers .config ;
4
- import static gregtech .api .enums .GT_Values .NF ;
5
- import static gregtech .api .enums .GT_Values .RA ;
4
+ import static gregtech .api .recipe .RecipeMaps .assemblerRecipes ;
5
+ import static gregtech .api .util .GT_RecipeBuilder .MINUTES ;
6
+ import static gregtech .api .util .GT_RecipeBuilder .SECONDS ;
7
+ import static net .minecraftforge .fluids .FluidRegistry .getFluidStack ;
6
8
7
9
import net .minecraft .init .Blocks ;
8
10
import net .minecraft .init .Items ;
9
11
import net .minecraft .item .ItemStack ;
10
- import net .minecraftforge .fluids .FluidRegistry ;
11
- import net .minecraftforge .fluids .FluidStack ;
12
12
import net .minecraftforge .oredict .OreDictionary ;
13
13
import net .minecraftforge .oredict .ShapedOreRecipe ;
14
14
19
19
20
20
import cpw .mods .fml .common .registry .GameRegistry ;
21
21
import cpw .mods .fml .common .registry .GameRegistry .UniqueIdentifier ;
22
+ import gregtech .api .enums .GT_Values ;
23
+ import gregtech .api .enums .Materials ;
24
+ import gregtech .api .enums .TierEU ;
22
25
import gregtech .api .util .GT_Utility ;
23
26
24
27
public class ModRecipes {
@@ -216,7 +219,8 @@ private static void fullDrawers1Recipes() {
216
219
217
220
// Oak Drawer Full 1x1 Gregtech Assembler recipes
218
221
for (ItemStack slabWood8W : slabWood8WList )
219
- RA .addAssemblerRecipe (new ItemStack [] { slabWood8W , chest1 , integratedCircuit1 }, NF , fullDrawer1 , 200 , 16 );
222
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood8W , chest1 , integratedCircuit1 ).itemOutputs (fullDrawer1 )
223
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
220
224
221
225
// Framed Drawer Full 1x1
222
226
@@ -228,12 +232,8 @@ private static void fullDrawers1Recipes() {
228
232
new ShapedOreRecipe (fullCustom1 , "bbb" , "bcb" , "bbb" , 'b' , carpentersBlock1 , 'c' , ORE_chestWood ));
229
233
230
234
// Framed Drawer Full 1x1 Gregtech Assembler recipe
231
- RA .addAssemblerRecipe (
232
- new ItemStack [] { carpentersBlock8 , chest1 , integratedCircuit1 },
233
- NF ,
234
- fullCustom1 ,
235
- 200 ,
236
- 16 );
235
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock8 , chest1 , integratedCircuit1 ).itemOutputs (fullCustom1 )
236
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
237
237
}
238
238
239
239
private static void fullDrawers2Recipes () {
@@ -249,12 +249,9 @@ private static void fullDrawers2Recipes() {
249
249
new ShapedOreRecipe (fullDrawers2 , "scs" , "sss" , "scs" , 's' , ORE_slabWood , 'c' , ORE_chestWood ));
250
250
251
251
// Oak Drawer Full 1x2 Gregtech Assembler recipes
252
- for (ItemStack slabWood7W : slabWood7WList ) RA .addAssemblerRecipe (
253
- new ItemStack [] { slabWood7W , chest2 , integratedCircuit2 },
254
- NF ,
255
- fullDrawers2 ,
256
- 200 ,
257
- 16 );
252
+ for (ItemStack slabWood7W : slabWood7WList )
253
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood7W , chest2 , integratedCircuit2 ).itemOutputs (fullDrawers2 )
254
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
258
255
259
256
// Framed Drawer Full 1x2
260
257
@@ -266,12 +263,8 @@ private static void fullDrawers2Recipes() {
266
263
new ShapedOreRecipe (fullCustom2 , "bcb" , "bbb" , "bcb" , 'b' , carpentersBlock1 , 'c' , ORE_chestWood ));
267
264
268
265
// Framed Drawer Full 1x2 Gregtech Assembler recipe
269
- RA .addAssemblerRecipe (
270
- new ItemStack [] { carpentersBlock7 , chest2 , integratedCircuit2 },
271
- NF ,
272
- fullCustom2 ,
273
- 200 ,
274
- 16 );
266
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock7 , chest2 , integratedCircuit2 ).itemOutputs (fullCustom2 )
267
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
275
268
}
276
269
277
270
private static void fullDrawers4Recipes () {
@@ -287,12 +280,9 @@ private static void fullDrawers4Recipes() {
287
280
new ShapedOreRecipe (fullDrawers4 , "csc" , "sss" , "csc" , 's' , ORE_slabWood , 'c' , ORE_chestWood ));
288
281
289
282
// Oak Drawer Full 2x2 Gregtech Assembler recipes
290
- for (ItemStack slabWood5W : slabWood5WList ) RA .addAssemblerRecipe (
291
- new ItemStack [] { slabWood5W , chest4 , integratedCircuit4 },
292
- NF ,
293
- fullDrawers4 ,
294
- 200 ,
295
- 16 );
283
+ for (ItemStack slabWood5W : slabWood5WList )
284
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood5W , chest4 , integratedCircuit4 ).itemOutputs (fullDrawers4 )
285
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
296
286
297
287
// Framed Drawer Full 2x2
298
288
@@ -304,12 +294,8 @@ private static void fullDrawers4Recipes() {
304
294
new ShapedOreRecipe (fullCustom4 , "cbc" , "bbb" , "cbc" , 'b' , carpentersBlock1 , 'c' , ORE_chestWood ));
305
295
306
296
// Framed Drawer Full 2x2 Gregtech Assembler recipe
307
- RA .addAssemblerRecipe (
308
- new ItemStack [] { carpentersBlock5 , chest4 , integratedCircuit4 },
309
- NF ,
310
- fullCustom4 ,
311
- 200 ,
312
- 16 );
297
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock5 , chest4 , integratedCircuit4 ).itemOutputs (fullCustom4 )
298
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
313
299
}
314
300
315
301
private static void halfDrawers2Recipes () {
@@ -325,12 +311,9 @@ private static void halfDrawers2Recipes() {
325
311
new ShapedOreRecipe (halfDrawers2 , "sss" , "csc" , "sss" , 's' , ORE_slabWood , 'c' , ORE_chestWood ));
326
312
327
313
// Oak Drawer Half 1x2 Gregtech Assembler recipes
328
- for (ItemStack slabWood7W : slabWood7WList ) RA .addAssemblerRecipe (
329
- new ItemStack [] { slabWood7W , chest2 , integratedCircuit12 },
330
- NF ,
331
- halfDrawers2 ,
332
- 200 ,
333
- 16 );
314
+ for (ItemStack slabWood7W : slabWood7WList )
315
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood7W , chest2 , integratedCircuit12 ).itemOutputs (halfDrawers2 )
316
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
334
317
335
318
// Framed Drawer Half 1x2
336
319
@@ -342,12 +325,8 @@ private static void halfDrawers2Recipes() {
342
325
new ShapedOreRecipe (halfCustom2 , "bbb" , "cbc" , "bbb" , 'b' , carpentersBlock1 , 'c' , ORE_chestWood ));
343
326
344
327
// Framed Drawer Half 1x2 Gregtech Assembler recipe
345
- RA .addAssemblerRecipe (
346
- new ItemStack [] { carpentersBlock7 , chest2 , integratedCircuit12 },
347
- NF ,
348
- halfCustom2 ,
349
- 200 ,
350
- 16 );
328
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock7 , chest2 , integratedCircuit12 ).itemOutputs (halfCustom2 )
329
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
351
330
}
352
331
353
332
private static void halfDrawers4Recipes () {
@@ -362,12 +341,9 @@ private static void halfDrawers4Recipes() {
362
341
GameRegistry .addRecipe (
363
342
new ShapedOreRecipe (halfDrawers4 , "csc" , "scs" , "csc" , 's' , ORE_slabWood , 'c' , ORE_chestWood ));
364
343
365
- for (ItemStack slabWood4W : slabWood4WList ) RA .addAssemblerRecipe (
366
- new ItemStack [] { slabWood4W , chest5 , integratedCircuit14 },
367
- NF ,
368
- halfDrawers4 ,
369
- 200 ,
370
- 16 );
344
+ for (ItemStack slabWood4W : slabWood4WList )
345
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood4W , chest5 , integratedCircuit14 ).itemOutputs (halfDrawers4 )
346
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
371
347
372
348
// Framed Drawer Half 2x2
373
349
@@ -379,12 +355,8 @@ private static void halfDrawers4Recipes() {
379
355
new ShapedOreRecipe (halfCustom4 , "cbc" , "bcb" , "cbc" , 'b' , carpentersBlock1 , 'c' , ORE_chestWood ));
380
356
381
357
// Framed Drawer Half 2x2 Gregtech Assembler recipe
382
- RA .addAssemblerRecipe (
383
- new ItemStack [] { carpentersBlock4 , chest5 , integratedCircuit14 },
384
- NF ,
385
- halfCustom4 ,
386
- 200 ,
387
- 16 );
358
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock4 , chest5 , integratedCircuit14 ).itemOutputs (halfCustom4 )
359
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
388
360
}
389
361
390
362
private static void trimRecipes () {
@@ -400,7 +372,8 @@ private static void trimRecipes() {
400
372
401
373
// Oak Trim Gregtech Assembler recipe
402
374
for (ItemStack slabWood5W : slabWood5WList )
403
- RA .addAssemblerRecipe (new ItemStack [] { slabWood5W , stick4 , integratedCircuit1 }, NF , trim , 200 , 16 );
375
+ GT_Values .RA .stdBuilder ().itemInputs (slabWood5W , stick4 , integratedCircuit1 ).itemOutputs (trim )
376
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
404
377
405
378
// Framed Trim
406
379
@@ -412,12 +385,8 @@ private static void trimRecipes() {
412
385
new ShapedOreRecipe (trimCustom , "tbt" , "bbb" , "tbt" , 'b' , carpentersBlock1 , 't' , ORE_stickWood ));
413
386
414
387
// Framed Trim Gregtech Assembler recipe
415
- RA .addAssemblerRecipe (
416
- new ItemStack [] { carpentersBlock5 , stick4 , integratedCircuit1 },
417
- NF ,
418
- trimCustom ,
419
- 200 ,
420
- 16 );
388
+ GT_Values .RA .stdBuilder ().itemInputs (carpentersBlock5 , stick4 , integratedCircuit1 ).itemOutputs (trimCustom )
389
+ .duration (10 * SECONDS ).eut (16 ).addTo (assemblerRecipes );
421
390
}
422
391
423
392
private static void compDrawersRecipes () {
@@ -521,8 +490,8 @@ private static void upgradeTemplateRecipes() {
521
490
't' ,
522
491
ORE_craftingToolScrewdriver ));
523
492
524
- for (ItemStack drawer : drawerBasicW )
525
- RA . addAssemblerRecipe ( new ItemStack [] { drawer , piston }, NF , upgradeTemplate , 1200 , 16 );
493
+ for (ItemStack drawer : drawerBasicW ) GT_Values . RA . stdBuilder (). itemInputs ( drawer , piston )
494
+ . itemOutputs ( upgradeTemplate ). duration ( 1 * MINUTES ). eut ( 16 ). addTo ( assemblerRecipes );
526
495
}
527
496
528
497
private static void storageUpgradeRecipes () {
@@ -774,40 +743,31 @@ private static void shroudKeyUpgradeRecipes() {
774
743
if (!config .cache .enableShroudUpgrades ) return ;
775
744
776
745
// Concealment Key
777
- RA .addAssemblerRecipe (
778
- new ItemStack [] { upgradeLock , new ItemStack (Items .ender_eye ) },
779
- NF ,
780
- new ItemStack (ModItems .shroudKey ),
781
- 100 ,
782
- 30 );
746
+ GT_Values .RA .stdBuilder ().itemInputs (upgradeLock , new ItemStack (Items .ender_eye ))
747
+ .itemOutputs (new ItemStack (ModItems .shroudKey )).duration (5 * SECONDS ).eut (TierEU .RECIPE_LV )
748
+ .addTo (assemblerRecipes );
783
749
}
784
750
785
751
private static void personalKeyUpgradeRecipes () {
786
752
if (!config .cache .enablePersonalUpgrades ) return ;
787
753
788
754
// Storage Personal Key
789
- RA .addAssemblerRecipe (
790
- new ItemStack [] { upgradeLock , new ItemStack (Items .name_tag ) },
791
- NF ,
792
- new ItemStack (ModItems .personalKey ),
793
- 100 ,
794
- 30 );
755
+ GT_Values .RA .stdBuilder ().itemInputs (upgradeLock , new ItemStack (Items .name_tag ))
756
+ .itemOutputs (new ItemStack (ModItems .personalKey )).duration (5 * SECONDS ).eut (TierEU .RECIPE_LV )
757
+ .addTo (assemblerRecipes );
795
758
}
796
759
797
760
private static void packingTapeRecipes () {
798
761
if (!config .cache .enableTape ) return ;
799
762
800
763
// Packing Tape
801
- RA .addAssemblerRecipe (
802
- new ItemStack [] { new ItemStack (Items .paper ), GT_Utility .getIntegratedCircuit (1 ) },
803
- new FluidStack (
804
- (FluidRegistry .getFluid (FLUID_NAME_refinedglue ) != null )
805
- ? FluidRegistry .getFluid (FLUID_NAME_refinedglue )
806
- : FluidRegistry .getFluid ("glue" ), // Fallback glue
807
- 144 ),
808
- new ItemStack (ModItems .tape ),
809
- 200 ,
810
- 30 );
764
+ GT_Values .RA .stdBuilder ().itemInputs (new ItemStack (Items .paper ), integratedCircuit1 )
765
+ .fluidInputs (getFluidStack ("glue" , 144 )).itemOutputs (new ItemStack (ModItems .tape ))
766
+ .duration (10 * SECONDS ).eut (TierEU .RECIPE_LV ).addTo (assemblerRecipes );
767
+
768
+ GT_Values .RA .stdBuilder ().itemInputs (new ItemStack (Items .paper ), integratedCircuit1 )
769
+ .fluidInputs (Materials .Glue .getFluid (144 )).itemOutputs (new ItemStack (ModItems .tape ))
770
+ .duration (10 * SECONDS ).eut (TierEU .RECIPE_LV ).addTo (assemblerRecipes );
811
771
}
812
772
813
773
/*
0 commit comments