aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java470
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java704
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java26
5 files changed, 650 insertions, 564 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java
index f0a816d405..6ed5eecd38 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java
@@ -31,6 +31,7 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base {
final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15;
//Nuggets
+ if (material.getIngot(1) != null && material.getNugget(1) != null)
GT_Values.RA.addAlloySmelterRecipe(
material.getIngot(1),
ItemList.Shape_Mold_Nugget.get(0),
@@ -39,6 +40,7 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base {
2 * tVoltageMultiplier);
//Gears
+ if (material.getIngot(1) != null && material.getGear(1) != null)
GT_Values.RA.addAlloySmelterRecipe(
material.getIngot(8),
ItemList.Shape_Mold_Gear.get(0),
@@ -47,6 +49,7 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base {
2 * tVoltageMultiplier);
//Ingot
+ if (material.getIngot(1) != null && material.getNugget(1) != null)
GT_Values.RA.addAlloySmelterRecipe(
material.getNugget(9),
ItemList.Shape_Mold_Ingot.get(0),
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
index 08008994ea..2fd7f93c2d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
@@ -35,7 +35,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15;
final ItemStack itemIngot = material.getIngot(1);
- final ItemStack plate_Single = material.getPlate(1);
+ final ItemStack itemPlate = material.getPlate(1);
final ItemStack itemGear = material.getGear(1);
final ItemStack shape_Plate = ItemList.Shape_Extruder_Plate.get(0);
@@ -49,6 +49,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName());
//Ingot Recipe
+ if (material.getIngot(1) != null && material.getBlock(1) != null)
if (addExtruderRecipe(
material.getBlock(1),
shape_Ingot,
@@ -62,6 +63,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
}
//Block Recipe
+ if (material.getIngot(1) != null && material.getBlock(1) != null)
if (addExtruderRecipe(
material.getIngot(9),
shape_Block,
@@ -75,10 +77,11 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
}
//Plate Recipe
+ if (material.getIngot(1) != null && material.getPlate(1) != null)
if (addExtruderRecipe(
itemIngot,
shape_Plate,
- plate_Single,
+ itemPlate,
10, 4 * tVoltageMultiplier)){
Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success");
}
@@ -87,6 +90,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
}
//Ring Recipe
+ if (material.getIngot(1) != null && material.getRing(1) != null)
if (!material.isRadioactive){
if (addExtruderRecipe(
itemIngot,
@@ -103,6 +107,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
//Gear Recipe
+ if (material.getIngot(1) != null && material.getGear(1) != null)
if (!material.isRadioactive){
if (addExtruderRecipe(
material.getIngot(4),
@@ -119,6 +124,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
//Rod Recipe
+ if (material.getIngot(1) != null && material.getRod(1) != null)
if (addExtruderRecipe(
itemIngot,
shape_Rod,
@@ -133,6 +139,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
//Bolt Recipe
+ if (material.getIngot(1) != null && material.getBolt(1) != null)
if (!material.isRadioactive){
if (addExtruderRecipe(
itemIngot,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
index 1f3c91c9cb..5e2675689b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
@@ -18,11 +18,11 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
}
- public RecipeGen_Fluids(final Material M){
+ public RecipeGen_Fluids(final Material M) {
this(M, false);
}
-
- public RecipeGen_Fluids(final Material M, final boolean dO){
+
+ public RecipeGen_Fluids(final Material M, final boolean dO) {
this.toGenerate = M;
this.disableOptional = dO;
mRecipeGenMap.add(this);
@@ -33,263 +33,269 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
generateRecipes(this.toGenerate, this.disableOptional);
}
- private void generateRecipes(final Material material, final boolean dO){
+ private void generateRecipes(final Material material, final boolean dO) {
if (material == null) {
return;
}
-
- //Melting Shapes to fluid
- if (material.getFluid(1) != null && !material.getFluid(1).getUnlocalizedName().toLowerCase().contains("plasma")){
-
+
+ // Melting Shapes to fluid
+ if (material.getFluid(1) != null
+ && !material.getFluid(1).getUnlocalizedName().toLowerCase().contains("plasma")) {
+
if (!material.requiresBlastFurnace()) {
- //Ingot
- if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), //Input
- null, //Input 2
- material.getFluid(144), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Ingot
+ if (material.getIngot(1) != null)
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), // Input
+ null, // Input 2
+ material.getFluid(144), // Fluid Output
+ 0, // Chance
+ 1 * 20, // Duration
+ 16 // Eu Tick
+ )) {
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
- //Plate
- if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), //Input
- null, //Input 2
- material.getFluid(144), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Plate
+ if (material.getPlate(1) != null)
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), // Input
+ null, // Input 2
+ material.getFluid(144), // Fluid Output
+ 0, // Chance
+ 1 * 20, // Duration
+ 16 // Eu Tick
+ )) {
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
- //Double Plate
- if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), //Input
- null, //Input 2
- material.getFluid(288), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Double Plate
+ if (material.getPlateDouble(1) != null)
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), // Input
+ null, // Input 2
+ material.getFluid(288), // Fluid Output
+ 0, // Chance
+ 1 * 20, // Duration
+ 16 // Eu Tick
+ )) {
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
- //Nugget
- if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), //Input
- null, //Input 2
- material.getFluid(16), //Fluid Output
- 0, //Chance
- 16, //Duration
- 8 //Eu Tick
- )){
- Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Nugget
+ if (material.getNugget(1) != null)
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), // Input
+ null, // Input 2
+ material.getFluid(16), // Fluid Output
+ 0, // Chance
+ 16, // Duration
+ 8 // Eu Tick
+ )) {
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
- //Block
- if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), //Input
- null, //Input 2
- material.getFluid(144*9), //Fluid Output
- 0, //Chance
- 288, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Block
+ if (material.getBlock(1) != null)
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), // Input
+ null, // Input 2
+ material.getFluid(144 * 9), // Fluid Output
+ 0, // Chance
+ 288, // Duration
+ 16 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: "
+ + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid extractor from 1 block Recipe: "
+ + material.getLocalizedName() + " - Failed");
+ }
}
+ // Making Shapes from fluid
+ // Ingot
+ if (material.getIngot(1) != null)
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), // Item Shape
+ material.getFluid(144), // Fluid Input
+ material.getIngot(1), // output
+ 32, // Duration
+ 8 // Eu Tick
+ )) {
+ Logger.WARNING(
+ "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING(
+ "144l fluid molder for 1 ingot Recipe: " + material.getLocalizedName() + " - Failed");
+ }
+ // Plate
+ if (material.getPlate(1) != null)
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0), // Item Shape
+ material.getFluid(144), // Fluid Input
+ material.getPlate(1), // output
+ 32, // Duration
+ 8 // Eu Tick
+ )) {
+ Logger.WARNING(
+ "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING(
+ "144l fluid molder for 1 plate Recipe: " + material.getLocalizedName() + " - Failed");
+ }
+ // Nugget
+ if (material.getNugget(1) != null)
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), // Item Shape
+ material.getFluid(16), // Fluid Input
+ material.getNugget(1), // output
+ 16, // Duration
+ 4 // Eu Tick
+ )) {
+ Logger.WARNING(
+ "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING(
+ "16l fluid molder for 1 nugget Recipe: " + material.getLocalizedName() + " - Failed");
+ }
- //Making Shapes from fluid
-
- //Ingot
- if (GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Ingot.get(0), //Item Shape
- material.getFluid(144), //Fluid Input
- material.getIngot(1), //output
- 32, //Duration
- 8 //Eu Tick
- )){
- Logger.WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid molder for 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Gears
+ if (material.getGear(1) != null)
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0), // Item Shape
+ material.getFluid(576), // Fluid Input
+ material.getGear(1), // output
+ 128, // Duration
+ 8 // Eu Tick
+ )) {
+ Logger.WARNING(
+ "576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING("576l fluid molder for 1 gear Recipe: " + material.getLocalizedName() + " - Failed");
+ }
- //Plate
- if (GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Plate.get(0), //Item Shape
- material.getFluid(144), //Fluid Input
- material.getPlate(1), //output
- 32, //Duration
- 8 //Eu Tick
- )){
- Logger.WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid molder for 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // Blocks
+ if (material.getBlock(1) != null)
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), // Item Shape
+ material.getFluid(144 * 9), // Fluid Input
+ material.getBlock(1), // output
+ 288, // Duration
+ 16 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 block Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
- //Nugget
- if (GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Nugget.get(0), //Item Shape
- material.getFluid(16), //Fluid Input
- material.getNugget(1), //output
- 16, //Duration
- 4 //Eu Tick
- )){
- Logger.WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("16l fluid molder for 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ if (CORE.GTNH) {
- //Gears
- if (GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Gear.get(0), //Item Shape
- material.getFluid(576), //Fluid Input
- material.getGear(1), //output
- 128, //Duration
- 8 //Eu Tick
- )){
- Logger.WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("576l fluid molder for 1 gear Recipe: "+material.getLocalizedName()+" - Failed");
- }
+ // GTNH
- //Blocks
- if (GT_Values.RA.addFluidSolidifierRecipe(
- ItemList.Shape_Mold_Block.get(0), //Item Shape
- material.getFluid(144*9), //Fluid Input
- material.getBlock(1), //output
- 288, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
-
-
-
- if (CORE.GTNH){
-
- //GTNH
-
- //Shape_Mold_Rod
- //Shape_Mold_Rod_Long
- //Shape_Mold_Bolt,
- //Shape_Mold_Screw,
- //Shape_Mold_Ring,
+ // Shape_Mold_Rod
+ // Shape_Mold_Rod_Long
+ // Shape_Mold_Bolt,
+ // Shape_Mold_Screw,
+ // Shape_Mold_Ring,
ItemList mold_Rod = ItemList.valueOf("Shape_Mold_Rod");
ItemList mold_Rod_Long = ItemList.valueOf("Shape_Mold_Rod_Long");
ItemList mold_Bolt = ItemList.valueOf("Shape_Mold_Bolt");
ItemList mold_Screw = ItemList.valueOf("Shape_Mold_Screw");
ItemList mold_Ring = ItemList.valueOf("Shape_Mold_Ring");
-
- //Rod
- if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(
- mold_Rod.get(0), //Item Shape
- material.getFluid(72), //Fluid Input
- material.getRod(1), //output
- 150, //Duration
- 24 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 rod Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 rod Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Rod Long
- if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(
- mold_Rod_Long.get(0), //Item Shape
- material.getFluid(144), //Fluid Input
- material.getLongRod(1), //output
- 300, //Duration
- 24 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 rod long Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 rod long Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Bolt
- if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(
- mold_Bolt.get(0), //Item Shape
- material.getFluid(18), //Fluid Input
- material.getBolt(1), //output
- 50, //Duration
- 6 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 bolt Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 bolt Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Screw
- if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(
- mold_Screw.get(0), //Item Shape
- material.getFluid(18), //Fluid Input
- material.getScrew(1), //output
- 50, //Duration
- 6 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 screw Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 screw Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Ring
- if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(
- mold_Ring.get(0), //Item Shape
- material.getFluid(36), //Fluid Input
- material.getRing(1), //output
- 100, //Duration
- 12 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid molder from 1 ring Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid molder from 1 ring Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
-
-
-
-
-
-
-
+
+ // Rod
+ if (material.getRod(1) != null)
+ if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod.get(0), // Item Shape
+ material.getFluid(72), // Fluid Input
+ material.getRod(1), // output
+ 150, // Duration
+ 24 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rod Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
+
+ // Rod Long
+ if (material.getLongRod(1) != null)
+ if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod_Long.get(0), // Item
+ // Shape
+ material.getFluid(144), // Fluid Input
+ material.getLongRod(1), // output
+ 300, // Duration
+ 24 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: "
+ + material.getLocalizedName() + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rod long Recipe: "
+ + material.getLocalizedName() + " - Failed");
+ }
+
+ // Bolt
+ if (material.getBolt(1) != null)
+ if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Bolt.get(0), // Item Shape
+ material.getFluid(18), // Fluid Input
+ material.getBolt(1), // output
+ 50, // Duration
+ 6 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 bolt Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
+
+ // Screw
+ if (material.getScrew(1) != null)
+ if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Screw.get(0), // Item Shape
+ material.getFluid(18), // Fluid Input
+ material.getScrew(1), // output
+ 50, // Duration
+ 6 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 screw Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
+
+ // Ring
+ if (material.getRing(1) != null)
+ if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Ring.get(0), // Item Shape
+ material.getFluid(36), // Fluid Input
+ material.getRing(1), // output
+ 100, // Duration
+ 12 // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
+
}
}
}
}
-
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
index 99984d98bf..9529b9019a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
@@ -2,6 +2,8 @@ package gtPlusPlus.xmod.gregtech.loaders;
import net.minecraft.item.ItemStack;
+import java.util.ArrayList;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -33,7 +35,7 @@ public class RecipeGen_Ore implements Runnable{
public void run() {
generateRecipes(this.toGenerate);
}
-
+
private static Material mStone;
public static void generateRecipes(final Material material){
@@ -41,26 +43,51 @@ public class RecipeGen_Ore implements Runnable{
if (mStone == null) {
mStone = MaterialUtils.generateMaterialFromGtENUM(Materials.Stone);
}
-
+
//if (material.getMaterialComposites().length > 1){
- Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]");
- int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier);
- if (tVoltageMultiplier < 120) {
- tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 480 : 120;
- }
-
- final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1);
- Material bonusA = null; //Ni
- Material bonusB = null; //Tin
+ Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]");
+ int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier);
+ if (tVoltageMultiplier < 120) {
+ tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 480 : 120;
+ }
- if (material.getComposites().size() >= 1 && material.getComposites().get(0) != null){
- bonusA = material.getComposites().get(0).getStackMaterial();
- }
- else {
- bonusA = material;
+ final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1);
+ Material bonusA = null; //Ni
+ Material bonusB = null; //Tin
+
+ if (material.getComposites().size() >= 1 && material.getComposites().get(0) != null){
+ bonusA = material.getComposites().get(0).getStackMaterial();
+ }
+ else {
+ bonusA = material;
+ }
+
+ boolean allFailed = false;
+
+
+ //Setup Bonuses
+ ArrayList<Material> aMatComp = new ArrayList<Material>();
+ for (Material j : MaterialUtils.getCompoundMaterialsRecursively(material)) {
+ aMatComp.add(j);
+ }
+
+ if (aMatComp.size() < 3) {
+ while (aMatComp.size() < 3) {
+ aMatComp.add(material);
}
+ }
- boolean allFailed = false;
+ AutoMap<Material> amJ = new AutoMap<Material>();
+ int aIndexCounter = 0;
+ for (Material g : aMatComp) {
+ if (g.hasSolidForm()) {
+ if (getDust(g) != null && getTinyDust(g) != null) {
+ amJ.put(g);
+ }
+ }
+ }
+
+ if (amJ.size() < 2) {
if (material.getComposites().size() >= 2 && material.getComposites().get(1) != null){
bonusB = material.getComposites().get(1).getStackMaterial();
//If Secondary Output has no solid output, try the third (If it exists)
@@ -84,64 +111,91 @@ public class RecipeGen_Ore implements Runnable{
else {
allFailed = true;
}
+ }
+ else {
+ bonusA = amJ.get(0);
+ bonusB = amJ.get(1);
+ }
- //Default out if it's made of fluids or some shit.
- if (allFailed || bonusB == null) {
- bonusB = tVoltageMultiplier <= 100 ? material : mStone;
- }
+ //Default out if it's made of fluids or some shit.
+ if (bonusA == null) {
+ bonusA = tVoltageMultiplier <= 100 ? material : mStone;
+ }
+ //Default out if it's made of fluids or some shit.
+ if (allFailed || bonusB == null) {
+ bonusB = tVoltageMultiplier <= 100 ? material : mStone;
+ }
- AutoMap<Pair<Integer, Material>> componentMap = new AutoMap<Pair<Integer, Material>>();
- for (MaterialStack r : material.getComposites()){
- if (r != null){
- componentMap.put(new Pair<Integer, Material>(r.getPartsPerOneHundred(), r.getStackMaterial()));
- }
+ AutoMap<Pair<Integer, Material>> componentMap = new AutoMap<Pair<Integer, Material>>();
+ for (MaterialStack r : material.getComposites()){
+ if (r != null){
+ componentMap.put(new Pair<Integer, Material>(r.getPartsPerOneHundred(), r.getStackMaterial()));
}
+ }
- //Need two valid outputs
- if (bonusA == null || bonusB == null || !bonusA.hasSolidForm() || !bonusB.hasSolidForm()) {
- return;
- }
- /**
- * Macerate
- */
- //Macerate ore to Crushed
- if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){
- Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'");
+ //Need two valid outputs
+ if (bonusA == null || bonusB == null || !bonusA.hasSolidForm() || !bonusB.hasSolidForm()) {
+ if (bonusA == null) {
+ bonusA = mStone;
}
- //Macerate Crushed to Impure Dust
- if (GT_Values.RA.addPulveriserRecipe(material.getCrushed(1), new ItemStack[]{material.getDustImpure(1), bonusA.getDust(1)}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
- Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Crushed ore to Impure Dust'");
+ if (bonusB == null) {
+ bonusB = mStone;
}
- //Macerate Washed to Purified Dust
- if (GT_Values.RA.addPulveriserRecipe(material.getCrushedPurified(1), new ItemStack[]{material.getDustPurified(1), bonusA.getDust(1)}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
- Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Washed ore to Purified Dust'");
- }
- //Macerate Centrifuged to Pure Dust
- if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{material.getDust(1), bonusA.getDust(1)}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
- Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'");
+ if (!bonusA.hasSolidForm()) {
+ bonusA = mStone;
}
+ if (!bonusB.hasSolidForm()) {
+ bonusB = mStone;
+ }
+ }
- /**
- * Wash
- */
- //Wash into Purified Crushed
- /*if (GT_Values.RA.addOreWasherRecipe(material.getCrushed(1), material.getCrushedPurified(1), bonusA.getTinyDust(1), dustStone, FluidUtils.getWater(1000), 25*20, 16)){
+ ItemStack tinyDustA = getTinyDust(bonusA);
+ ItemStack tinyDustB = getTinyDust(bonusB);
+ ItemStack matDust = getDust(material);
+ ItemStack matDustA = getDust(bonusA);
+ ItemStack matDustB = getDust(bonusB);
+
+ /**
+ * Macerate
+ */
+ //Macerate ore to Crushed
+ if (GT_Values.RA.addPulveriserRecipe(material.getOre(1), new ItemStack[]{material.getCrushed(2)}, new int[]{10000}, 20*20, tVoltageMultiplier/2)){
+ Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate ore to Crushed ore'");
+ }
+ //Macerate Crushed to Impure Dust
+ if (GT_Values.RA.addPulveriserRecipe(material.getCrushed(1), new ItemStack[]{material.getDustImpure(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
+ Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Crushed ore to Impure Dust'");
+ }
+ //Macerate Washed to Purified Dust
+ if (GT_Values.RA.addPulveriserRecipe(material.getCrushedPurified(1), new ItemStack[]{material.getDustPurified(1), matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
+ Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Washed ore to Purified Dust'");
+ }
+ //Macerate Centrifuged to Pure Dust
+ if (GT_Values.RA.addPulveriserRecipe(material.getCrushedCentrifuged(1), new ItemStack[]{matDust, matDustA}, new int[]{10000, 1000}, 20*20, tVoltageMultiplier/2)){
+ Logger.MATERIALS("[Macerator] Added Recipe: 'Macerate Centrifuged ore to Pure Dust'");
+ }
+
+ /**
+ * Wash
+ */
+ //Wash into Purified Crushed
+ /*if (GT_Values.RA.addOreWasherRecipe(material.getCrushed(1), material.getCrushedPurified(1), bonusA.getTinyDust(1), dustStone, FluidUtils.getWater(1000), 25*20, 16)){
Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'");
}*/
- //.08 compat method
- if (GT_ModHandler.addOreWasherRecipe(material.getCrushed(1), 1000, material.getCrushedPurified(1), bonusA.getTinyDust(1), dustStone)){
- Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'");
- }
+ //.08 compat method
+ if (GT_ModHandler.addOreWasherRecipe(material.getCrushed(1), 1000, material.getCrushedPurified(1), tinyDustA, dustStone)){
+ Logger.MATERIALS("[OreWasher] Added Recipe: 'Wash Crushed ore into Purified Crushed ore'");
+ }
- /**
- * Thermal Centrifuge
- */
- /*//Crushed ore to Centrifuged Ore
- if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushed(1), material.getCrushedCentrifuged(1), bonusB.getTinyDust(1), dustStone, 25*20, 24)){
+ /**
+ * Thermal Centrifuge
+ */
+ /*//Crushed ore to Centrifuged Ore
+ if (GT_Values.RA.addThermalCentrifugeRecipe(material.getCrushed(1), material.getCrushedCentrifuged(1), tinyDustB, dustStone, 25*20, 24)){
Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore'");
}
//Washed ore to Centrifuged Ore
@@ -149,319 +203,319 @@ public class RecipeGen_Ore implements Runnable{
Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore'");
}*/
- Logger.MATERIALS("material.getCrushed(1): "+(material.getCrushed(1) != null));
- Logger.MATERIALS("material.getCrushedPurified(1): "+(material.getCrushedPurified(1) != null));
- Logger.MATERIALS("bonusA.getTinyDust(1): "+(bonusA.getTinyDust(1) != null)+" | Material: "+(bonusA != null) + " | Material name: "+(bonusA != null ? bonusA.getLocalizedName() : "invalid material"));
- Logger.MATERIALS("bonusB.getTinyDust(1): "+(bonusB.getTinyDust(1) != null)+" | Material: "+(bonusB != null) + " | Material name: "+(bonusB != null ? bonusB.getLocalizedName() : "invalid material"));
+ Logger.MATERIALS("material.getCrushed(1): "+(material.getCrushed(1) != null));
+ Logger.MATERIALS("material.getCrushedPurified(1): "+(material.getCrushedPurified(1) != null));
+ Logger.MATERIALS("bonusA.getTinyDust(1): "+(tinyDustA != null)+" | Material: "+(bonusA != null) + " | Material name: "+(bonusA != null ? bonusA.getLocalizedName() : "invalid material"));
+ Logger.MATERIALS("bonusB.getTinyDust(1): "+(tinyDustB != null)+" | Material: "+(bonusB != null) + " | Material name: "+(bonusB != null ? bonusB.getLocalizedName() : "invalid material"));
- try {
+ try {
//.08 compat
- if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), 200, material.getCrushedCentrifuged(1), bonusB.getTinyDust(1), dustStone)){
- Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore' | Input: "+material.getCrushed(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+bonusB.getTinyDust(1).getDisplayName()+", "+dustStone.getDisplayName()+".");
- }
- }
- catch (Throwable t) {}
- try {
- if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), 200, material.getCrushedCentrifuged(1), bonusA.getTinyDust(1), dustStone)){
- Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+bonusA.getTinyDust(1).getDisplayName()+", "+dustStone.getDisplayName()+".");
+ if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), 200, material.getCrushedCentrifuged(1), tinyDustB, dustStone)){
+ Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Crushed ore to Centrifuged Ore' | Input: "+material.getCrushed(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustB.getDisplayName()+", "+dustStone.getDisplayName()+".");
}
+ }
+ catch (Throwable t) {}
+ try {
+ if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), 200, material.getCrushedCentrifuged(1), tinyDustA, dustStone)){
+ Logger.MATERIALS("[ThermalCentrifuge] Added Recipe: 'Washed ore to Centrifuged Ore' | Input: "+material.getCrushedPurified(1).getDisplayName()+" | Outputs: "+material.getCrushedCentrifuged(1).getDisplayName()+", "+tinyDustA.getDisplayName()+", "+dustStone.getDisplayName()+".");
}
- catch (Throwable t) {}
-
+ }
+ catch (Throwable t) {}
- /**
- * Forge Hammer
- */
- if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), material.getDust(1), 10, tVoltageMultiplier/4)){
- Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'");
- }
- if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedPurified(1), material.getDustPurified(1), 10, tVoltageMultiplier/4)){
- Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Purified to Purified Dust'");
- }
- if (GT_Values.RA.addForgeHammerRecipe(material.getOre(1), material.getCrushed(1), 10, tVoltageMultiplier/4)){
- Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Ore to Crushed'");
- }
- /**
- * Centrifuge
- */
- //Purified Dust to Clean
- if (GT_Values.RA.addCentrifugeRecipe(
- material.getDustPurified(1), null,
- null, //In Fluid
- null, //Out Fluid
- material.getDust(1), bonusA.getTinyDust(1),null,
- null, null,null,
- new int[]{10000, 10000}, //Chances
- 5*20, //Eu
- tVoltageMultiplier/2)){ //Time
- Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust");
- }
+ /**
+ * Forge Hammer
+ */
+ if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){
+ Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'");
+ }
+ if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedPurified(1), material.getDustPurified(1), 10, tVoltageMultiplier/4))