diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-03 23:42:22 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-03 23:42:22 +1000 |
commit | a77bea506e342d169f905b14f18dcccce7dd77b5 (patch) | |
tree | 05d7899d4b056fd691ea793517a99eebc088e3db /src/Java/gtPlusPlus/xmod/gregtech/loaders | |
parent | f339c0c13650ac9ec322d5aca0060851426b7474 (diff) | |
download | GT5-Unofficial-a77bea506e342d169f905b14f18dcccce7dd77b5.tar.gz GT5-Unofficial-a77bea506e342d169f905b14f18dcccce7dd77b5.tar.bz2 GT5-Unofficial-a77bea506e342d169f905b14f18dcccce7dd77b5.zip |
+ Added Crafting Recipes for Gears in crafting tables and alloy smelters (They were missing).
+ Added Crafting Recipes for nuggets in the alloy smelter (It was missing).
$ Fixed the last recipeGen class not being loaded, also added the new one RecipeGen_AlloySmelter.java
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java | 42 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java | 24 |
2 files changed, 61 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java new file mode 100644 index 0000000000..36817d8621 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java @@ -0,0 +1,42 @@ +package gtPlusPlus.xmod.gregtech.loaders; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gtPlusPlus.core.material.Material; + +public class RecipeGen_AlloySmelter implements Runnable{ + + final Material toGenerate; + + public RecipeGen_AlloySmelter(final Material M){ + this.toGenerate = M; + } + + @Override + public void run() { + generateRecipes(toGenerate); + } + + public static void generateRecipes(final Material material){ + final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 64 : 16; + + //Nuggets + GT_Values.RA.addAlloySmelterRecipe( + material.getIngot(1), + ItemList.Shape_Mold_Nugget.get(1), + material.getNugget(9), + (int) Math.max(material.getMass() * 2L, 1L), + 2 * tVoltageMultiplier); + + //Gears + GT_Values.RA.addAlloySmelterRecipe( + material.getIngot(8), + ItemList.Shape_Mold_Gear.get(1), + material.getGear(1), + (int) Math.max(material.getMass() * 2L, 1L), + 2 * tVoltageMultiplier); + + } + +} + diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java index 6eaa164342..dee90df9ba 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -9,16 +9,16 @@ import net.minecraft.item.ItemStack; public class RecipeGen_ShapedCrafting implements Runnable{ final Material toGenerate; - + public RecipeGen_ShapedCrafting(final Material M){ this.toGenerate = M; } - + @Override public void run() { generateRecipes(toGenerate); } - + public static void generateRecipes(final Material material){ Utils.LOG_WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO @@ -90,7 +90,7 @@ public class RecipeGen_ShapedCrafting implements Runnable{ //Add a shapeless recipe for each dust this way - Compat mode. /*ItemStack[] inputStacks = material.getMaterialComposites(); ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - + if (inputStacks.length > 0){ Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks)); long[] inputStackSize = material.vSmallestRatio; @@ -111,7 +111,7 @@ public class RecipeGen_ShapedCrafting implements Runnable{ } } }*/ - + //Shaped Recipe - Bolts if (!material.isRadioactive){ @@ -179,6 +179,20 @@ public class RecipeGen_ShapedCrafting implements Runnable{ } } + //Gear Recipe + if (!material.isRadioactive){ + if (RecipeUtils.recipeBuilder( + material.getRod(1), material.getPlate(1), material.getRod(1), + material.getPlate(1), "craftingToolWrench", material.getPlate(1), + material.getRod(1), material.getPlate(1), material.getRod(1), + material.getGear(1))){ + Utils.LOG_WARNING("Gear Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Utils.LOG_WARNING("Gear Recipe: "+material.getLocalizedName()+" - Failed"); + } + } + //Screws if (!material.isRadioactive){ if (RecipeUtils.recipeBuilder( |