Skip to content

Commit ca3131f

Browse files
committed
convert Ra1-->Ra2
1 parent c7f2caa commit ca3131f

File tree

1 file changed

+50
-90
lines changed
  • src/main/java/com/jaquadro/minecraft/storagedrawers/integration/gtnh

1 file changed

+50
-90
lines changed

src/main/java/com/jaquadro/minecraft/storagedrawers/integration/gtnh/ModRecipes.java

Lines changed: 50 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package com.jaquadro.minecraft.storagedrawers.integration.gtnh;
22

33
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;
68

79
import net.minecraft.init.Blocks;
810
import net.minecraft.init.Items;
911
import net.minecraft.item.ItemStack;
10-
import net.minecraftforge.fluids.FluidRegistry;
11-
import net.minecraftforge.fluids.FluidStack;
1212
import net.minecraftforge.oredict.OreDictionary;
1313
import net.minecraftforge.oredict.ShapedOreRecipe;
1414

@@ -19,6 +19,9 @@
1919

2020
import cpw.mods.fml.common.registry.GameRegistry;
2121
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;
2225
import gregtech.api.util.GT_Utility;
2326

2427
public class ModRecipes {
@@ -216,7 +219,8 @@ private static void fullDrawers1Recipes() {
216219

217220
// Oak Drawer Full 1x1 Gregtech Assembler recipes
218221
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);
220224

221225
// Framed Drawer Full 1x1
222226

@@ -228,12 +232,8 @@ private static void fullDrawers1Recipes() {
228232
new ShapedOreRecipe(fullCustom1, "bbb", "bcb", "bbb", 'b', carpentersBlock1, 'c', ORE_chestWood));
229233

230234
// 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);
237237
}
238238

239239
private static void fullDrawers2Recipes() {
@@ -249,12 +249,9 @@ private static void fullDrawers2Recipes() {
249249
new ShapedOreRecipe(fullDrawers2, "scs", "sss", "scs", 's', ORE_slabWood, 'c', ORE_chestWood));
250250

251251
// 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);
258255

259256
// Framed Drawer Full 1x2
260257

@@ -266,12 +263,8 @@ private static void fullDrawers2Recipes() {
266263
new ShapedOreRecipe(fullCustom2, "bcb", "bbb", "bcb", 'b', carpentersBlock1, 'c', ORE_chestWood));
267264

268265
// 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);
275268
}
276269

277270
private static void fullDrawers4Recipes() {
@@ -287,12 +280,9 @@ private static void fullDrawers4Recipes() {
287280
new ShapedOreRecipe(fullDrawers4, "csc", "sss", "csc", 's', ORE_slabWood, 'c', ORE_chestWood));
288281

289282
// 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);
296286

297287
// Framed Drawer Full 2x2
298288

@@ -304,12 +294,8 @@ private static void fullDrawers4Recipes() {
304294
new ShapedOreRecipe(fullCustom4, "cbc", "bbb", "cbc", 'b', carpentersBlock1, 'c', ORE_chestWood));
305295

306296
// 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);
313299
}
314300

315301
private static void halfDrawers2Recipes() {
@@ -325,12 +311,9 @@ private static void halfDrawers2Recipes() {
325311
new ShapedOreRecipe(halfDrawers2, "sss", "csc", "sss", 's', ORE_slabWood, 'c', ORE_chestWood));
326312

327313
// 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);
334317

335318
// Framed Drawer Half 1x2
336319

@@ -342,12 +325,8 @@ private static void halfDrawers2Recipes() {
342325
new ShapedOreRecipe(halfCustom2, "bbb", "cbc", "bbb", 'b', carpentersBlock1, 'c', ORE_chestWood));
343326

344327
// 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);
351330
}
352331

353332
private static void halfDrawers4Recipes() {
@@ -362,12 +341,9 @@ private static void halfDrawers4Recipes() {
362341
GameRegistry.addRecipe(
363342
new ShapedOreRecipe(halfDrawers4, "csc", "scs", "csc", 's', ORE_slabWood, 'c', ORE_chestWood));
364343

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);
371347

372348
// Framed Drawer Half 2x2
373349

@@ -379,12 +355,8 @@ private static void halfDrawers4Recipes() {
379355
new ShapedOreRecipe(halfCustom4, "cbc", "bcb", "cbc", 'b', carpentersBlock1, 'c', ORE_chestWood));
380356

381357
// 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);
388360
}
389361

390362
private static void trimRecipes() {
@@ -400,7 +372,8 @@ private static void trimRecipes() {
400372

401373
// Oak Trim Gregtech Assembler recipe
402374
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);
404377

405378
// Framed Trim
406379

@@ -412,12 +385,8 @@ private static void trimRecipes() {
412385
new ShapedOreRecipe(trimCustom, "tbt", "bbb", "tbt", 'b', carpentersBlock1, 't', ORE_stickWood));
413386

414387
// 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);
421390
}
422391

423392
private static void compDrawersRecipes() {
@@ -521,8 +490,8 @@ private static void upgradeTemplateRecipes() {
521490
't',
522491
ORE_craftingToolScrewdriver));
523492

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);
526495
}
527496

528497
private static void storageUpgradeRecipes() {
@@ -774,40 +743,31 @@ private static void shroudKeyUpgradeRecipes() {
774743
if (!config.cache.enableShroudUpgrades) return;
775744

776745
// 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);
783749
}
784750

785751
private static void personalKeyUpgradeRecipes() {
786752
if (!config.cache.enablePersonalUpgrades) return;
787753

788754
// 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);
795758
}
796759

797760
private static void packingTapeRecipes() {
798761
if (!config.cache.enableTape) return;
799762

800763
// 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);
811771
}
812772

813773
/*

0 commit comments

Comments
 (0)