|
2 | 2 |
|
3 | 3 | import static gregtech.api.unification.ore.OrePrefix.*; |
4 | 4 |
|
| 5 | +import gregtech.api.unification.material.Materials; |
| 6 | + |
5 | 7 | import net.minecraft.item.ItemStack; |
6 | 8 |
|
7 | 9 | import gregtech.api.recipes.RecipeMaps; |
|
15 | 17 | public class GTEImplosionRecipeHandler { |
16 | 18 |
|
17 | 19 | public static void add(Material inputMaterial, Material outputMaterial) { |
18 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
19 | | - .input(dust, inputMaterial, 4) |
20 | | - .output(gem, outputMaterial, 3) |
21 | | - .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
22 | | - .buildAndRegister(); |
23 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
24 | | - .input(dust, inputMaterial, 4) |
25 | | - .output(gem, outputMaterial, 3) |
26 | | - .explosivesAmount(4) |
27 | | - .buildAndRegister(); |
28 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
29 | | - .input(dust, inputMaterial, 4) |
30 | | - .output(gem, outputMaterial, 3) |
31 | | - .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
32 | | - .buildAndRegister(); |
33 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
34 | | - .input(dust, inputMaterial, 4) |
35 | | - .output(gem, outputMaterial, 3) |
36 | | - .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
37 | | - .buildAndRegister(); |
38 | | - |
39 | | - if (!Mods.ImplosionNoBomb.isModLoaded()) return; |
40 | | - GTEImplosionNoBombRecipeHandler.add(inputMaterial, outputMaterial); |
| 20 | + if (Mods.ImplosionNoBomb.isModLoaded()) { |
| 21 | + GTEImplosionNoBombRecipeHandler.add(inputMaterial, outputMaterial); |
| 22 | + } else { |
| 23 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 24 | + .input(dust, inputMaterial, 4) |
| 25 | + .output(gem, outputMaterial, 3) |
| 26 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 27 | + .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
| 28 | + .buildAndRegister(); |
| 29 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 30 | + .input(dust, inputMaterial, 4) |
| 31 | + .output(gem, outputMaterial, 3) |
| 32 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 33 | + .explosivesAmount(4) |
| 34 | + .buildAndRegister(); |
| 35 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 36 | + .input(dust, inputMaterial, 4) |
| 37 | + .output(gem, outputMaterial, 3) |
| 38 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 39 | + .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
| 40 | + .buildAndRegister(); |
| 41 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 42 | + .input(dust, inputMaterial, 4) |
| 43 | + .output(gem, outputMaterial, 3) |
| 44 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 45 | + .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
| 46 | + .buildAndRegister(); |
| 47 | + } |
41 | 48 | } |
42 | 49 |
|
43 | 50 | public static void add(Material inputMaterial, ItemStack outputStack) { |
44 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
45 | | - .input(dust, inputMaterial, 4) |
46 | | - .outputs(GTUtility.copy(3, outputStack)) |
47 | | - .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
48 | | - .buildAndRegister(); |
49 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
50 | | - .input(dust, inputMaterial, 4) |
51 | | - .outputs(GTUtility.copy(3, outputStack)) |
52 | | - .explosivesAmount(4) |
53 | | - .buildAndRegister(); |
54 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
55 | | - .input(dust, inputMaterial, 4) |
56 | | - .outputs(outputStack) |
57 | | - .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
58 | | - .buildAndRegister(); |
59 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
60 | | - .input(dust, inputMaterial, 4) |
61 | | - .outputs(GTUtility.copy(3, outputStack)) |
62 | | - .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
63 | | - .buildAndRegister(); |
64 | | - |
65 | | - if (!Mods.ImplosionNoBomb.isModLoaded()) return; |
66 | | - GTEImplosionNoBombRecipeHandler.add(inputMaterial, outputStack); |
| 51 | + if (Mods.ImplosionNoBomb.isModLoaded()) { |
| 52 | + GTEImplosionNoBombRecipeHandler.add(inputMaterial, outputStack); |
| 53 | + } else { |
| 54 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 55 | + .input(dust, inputMaterial, 4) |
| 56 | + .outputs(GTUtility.copy(3, outputStack)) |
| 57 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 58 | + .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
| 59 | + .buildAndRegister(); |
| 60 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 61 | + .input(dust, inputMaterial, 4) |
| 62 | + .outputs(GTUtility.copy(3, outputStack)) |
| 63 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 64 | + .explosivesAmount(4) |
| 65 | + .buildAndRegister(); |
| 66 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 67 | + .input(dust, inputMaterial, 4) |
| 68 | + .outputs(GTUtility.copy(3, outputStack)) |
| 69 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 70 | + .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
| 71 | + .buildAndRegister(); |
| 72 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 73 | + .input(dust, inputMaterial, 4) |
| 74 | + .outputs(GTUtility.copy(3, outputStack)) |
| 75 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 76 | + .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
| 77 | + .buildAndRegister(); |
| 78 | + } |
67 | 79 | } |
68 | 80 |
|
69 | 81 | public static void add(String inputOreDict, ItemStack outputStack) { |
70 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
71 | | - .input(inputOreDict, 4) |
72 | | - .outputs(GTUtility.copy(3, outputStack)) |
73 | | - .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
74 | | - .buildAndRegister(); |
75 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
76 | | - .input(inputOreDict, 4) |
77 | | - .outputs(GTUtility.copy(3, outputStack)) |
78 | | - .explosivesAmount(4) |
79 | | - .buildAndRegister(); |
80 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
81 | | - .input(inputOreDict, 4) |
82 | | - .outputs(GTUtility.copy(3, outputStack)) |
83 | | - .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
84 | | - .buildAndRegister(); |
85 | | - RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
86 | | - .input(inputOreDict, 4) |
87 | | - .outputs(GTUtility.copy(3, outputStack)) |
88 | | - .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
89 | | - .buildAndRegister(); |
90 | | - |
91 | | - if (!Mods.ImplosionNoBomb.isModLoaded()) return; |
92 | | - GTEImplosionNoBombRecipeHandler.add(inputOreDict, outputStack); |
| 82 | + if (Mods.ImplosionNoBomb.isModLoaded()) { |
| 83 | + GTEImplosionNoBombRecipeHandler.add(inputOreDict, outputStack); |
| 84 | + } else { |
| 85 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 86 | + .input(inputOreDict, 4) |
| 87 | + .outputs(GTUtility.copy(3, outputStack)) |
| 88 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 89 | + .explosivesType(new ItemStack(MetaBlocks.POWDERBARREL, 8)) |
| 90 | + .buildAndRegister(); |
| 91 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 92 | + .input(inputOreDict, 4) |
| 93 | + .outputs(GTUtility.copy(3, outputStack)) |
| 94 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 95 | + .explosivesAmount(4) |
| 96 | + .buildAndRegister(); |
| 97 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 98 | + .input(inputOreDict, 4) |
| 99 | + .outputs(GTUtility.copy(3, outputStack)) |
| 100 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 101 | + .explosivesType(MetaItems.DYNAMITE.getStackForm(2)) |
| 102 | + .buildAndRegister(); |
| 103 | + RecipeMaps.IMPLOSION_RECIPES.recipeBuilder() |
| 104 | + .input(inputOreDict, 4) |
| 105 | + .outputs(GTUtility.copy(3, outputStack)) |
| 106 | + .chancedOutput(dust, Materials.DarkAsh, 2500, 0) |
| 107 | + .explosivesType(new ItemStack(MetaBlocks.ITNT)) |
| 108 | + .buildAndRegister(); |
| 109 | + } |
93 | 110 | } |
94 | 111 | } |
0 commit comments