aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java1
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java153
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java6
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java100
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java29
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java23
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java18
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java13
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java29
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_MolecularTransformer.java32
12 files changed, 251 insertions, 176 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
index e918d8015e..d2fb97010a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/Gregtech_Blocks.java
@@ -16,6 +16,7 @@ public class Gregtech_Blocks {
ModBlocks.blockCasingsTieredGTPP = new GregtechMetaTieredCasingBlocks1();
ModBlocks.blockSpecialMultiCasings = new GregtechMetaSpecialMultiCasings();
+ ModBlocks.blockSpecialMultiCasings2 = new GregtechMetaSpecialMultiCasings2();
ModBlocks.blockCustomMachineCasings = new GregtechMetaSpecialMachineCasings();
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index 9e58d486d3..f5abad2373 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -134,12 +134,12 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, (duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)), (int) aVoltage)){
Logger.WARNING("[BAS] Success.");
Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
- if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration, 120)){
+ /*if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/9, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
- }
+ }*/
/*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
@@ -157,12 +157,12 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
Logger.WARNING("[BAS] Success.");
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluidStack(144), M.getIngot(1), duration/2, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
- if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration/2, 60)){
+ /*if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration/2, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/2/9, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
- }
+ }*/
/*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
index 63c2d18783..3e54a7fe5d 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
@@ -8,10 +8,12 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
@@ -124,9 +126,9 @@ public class RecipeGen_BlastSmelterGT_GTNH {
FluidStack[] inputsF;
int voltage, time, special;
boolean enabled;
- inputs = x.mInputs;
- outputs = x.mOutputs;
- inputsF = x.mFluidInputs;
+ inputs = x.mInputs.clone();
+ outputs = x.mOutputs.clone();
+ inputsF = x.mFluidInputs.clone();
voltage = x.mEUt;
time = x.mDuration;
enabled = x.mEnabled;
@@ -157,6 +159,13 @@ public class RecipeGen_BlastSmelterGT_GTNH {
//If this recipe is enabled and we have a valid molten fluidstack, let's try add this recipe.
if (enabled && isValid(inputs, outputs, inputsF, mMoltenStack)) {
//Build correct input stack
+ ArrayList<ItemStack> aTempList = new ArrayList<ItemStack>();
+ for (ItemStack aPossibleCircuit : inputs) {
+ if (!ItemUtils.isControlCircuit(aPossibleCircuit)) {
+ aTempList.add(aPossibleCircuit);
+ }
+ }
+ inputs = aTempList.toArray(new ItemStack[aTempList.size()]);
ItemStack[] newInput = new ItemStack[inputs.length+1];
int l = 1;
for (ItemStack y : inputs) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
index cd43d6201c..54e9716520 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java
@@ -3,23 +3,22 @@ package gtPlusPlus.xmod.gregtech.loaders;
import java.util.HashSet;
import java.util.Set;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
-import gregtech.api.util.GT_Recipe;
-
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.item.ItemStack;
public class RecipeGen_Extruder extends RecipeGen_Base {
public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+ private static boolean mRotorShapeEnabled = false;
static {
MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ mRotorShapeEnabled = ItemUtils.doesItemListEntryExist("Shape_Extruder_Rotor");
}
public RecipeGen_Extruder(final Material M){
@@ -48,10 +47,10 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName());
-
+
if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) {
//Ingot Recipe
- if (addExtruderRecipe(
+ if (GT_Values.RA.addExtruderRecipe(
material.getBlock(1),
shape_Ingot,
material.getIngot(9),
@@ -64,7 +63,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
}
//Block Recipe
- if (addExtruderRecipe(
+ if (GT_Values.RA.addExtruderRecipe(
material.getIngot(9),
shape_Block,
material.getBlock(1),
@@ -80,97 +79,101 @@ public class RecipeGen_Extruder extends RecipeGen_Base {
//Plate Recipe
if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1)))
- if (addExtruderRecipe(
- itemIngot,
- shape_Plate,
- itemPlate,
- 10,
- material.vVoltageMultiplier)){
- Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Ring Recipe
- if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1)))
- if (!material.isRadioactive){
- if (addExtruderRecipe(
+ if (GT_Values.RA.addExtruderRecipe(
itemIngot,
- shape_Ring,
- material.getRing(4),
- (int) Math.max(material.getMass() * 2L * 1, 1),
+ shape_Plate,
+ itemPlate,
+ 10,
material.vVoltageMultiplier)){
- Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Plate Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ //Ring Recipe
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1)))
+ if (!material.isRadioactive){
+ if (GT_Values.RA.addExtruderRecipe(
+ itemIngot,
+ shape_Ring,
+ material.getRing(4),
+ (int) Math.max(material.getMass() * 2L * 1, 1),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Extruder Ring Recipe: "+material.getLocalizedName()+" - Failed");
+ }
}
- }
//Gear Recipe
if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1)))
- if (!material.isRadioactive){
- if (addExtruderRecipe(
- material.getIngot(4),
- shape_Gear,
- itemGear,
- (int) Math.max(material.getMass() * 5L, 1),
- material.vVoltageMultiplier)){
- Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success");
+ if (!material.isRadioactive){
+ if (GT_Values.RA.addExtruderRecipe(
+ material.getIngot(4),
+ shape_Gear,
+ itemGear,
+ (int) Math.max(material.getMass() * 5L, 1),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed");
+ }
}
- else {
- Logger.WARNING("Extruder Gear Recipe: "+material.getLocalizedName()+" - Failed");
- }
- }
//Rod Recipe
if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1)))
- if (addExtruderRecipe(
- itemIngot,
- shape_Rod,
- material.getRod(2),
- (int) Math.max(material.getMass() * 2L * 1, 1),
- material.vVoltageMultiplier)){
- Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
-
- //Bolt Recipe
- if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1)))
- if (!material.isRadioactive){
- if (addExtruderRecipe(
+ if (GT_Values.RA.addExtruderRecipe(
itemIngot,
- shape_Bolt,
- material.getBolt(8),
+ shape_Rod,
+ material.getRod(2),
(int) Math.max(material.getMass() * 2L * 1, 1),
material.vVoltageMultiplier)){
- Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Extruder Rod Recipe: "+material.getLocalizedName()+" - Failed");
}
- }
- }
+
+ //Bolt Recipe
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1)))
+ if (!material.isRadioactive){
+ if (GT_Values.RA.addExtruderRecipe(
+ itemIngot,
+ shape_Bolt,
+ material.getBolt(8),
+ (int) Math.max(material.getMass() * 2L * 1, 1),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Extruder Bolt Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+ }
+
+ //Rotor Recipe
+ // Shape_Extruder_Rotor
+ if (mRotorShapeEnabled && ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRotor(1)))
+ if (GT_Values.RA.addExtruderRecipe(
+ material.getIngot(5),
+ ItemUtils.getValueOfItemList("Shape_Extruder_Rotor", 0, ItemUtils.getErrorStack(1)),
+ material.getRotor(1),
+ 200,
+ 60)){
+ Logger.WARNING("Extruder Rotor Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Extruder Rotor Recipe: "+material.getLocalizedName()+" - Failed");
+ }
- public static boolean addExtruderRecipe(final ItemStack aInput, final ItemStack aShape, final ItemStack aOutput, int aDuration, final int aEUt) {
- if ((aInput == null) || (aShape == null) || (aOutput == null)) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sExtruderRecipes.addRecipe(true, new ItemStack[]{aInput, aShape}, new ItemStack[]{aOutput}, null, null, null, aDuration, aEUt, 0);
- return true;
- }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java
index 9fe86985f4..488af954d6 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_FluidCanning.java
@@ -177,6 +177,8 @@ public class RecipeGen_FluidCanning implements Runnable {
private final boolean addFluidExtractionRecipe(GT_Recipe aRecipe) {
boolean result = false;
+ CORE.crash();
+ Logger.INFO("[FE-Debug] "+aRecipe.mFluidOutputs[0].amount+"L of "+aRecipe.mFluidOutputs[0].getLocalizedName()+" fluid extractor from 1 " + aRecipe.mInputs[0].getDisplayName() + " - Success. Time: "+aRecipe.mDuration+", Voltage: "+aRecipe.mEUt);
int aCount1 = GT_Recipe_Map.sFluidExtractionRecipes.mRecipeList.size();
int aCount2 = aCount1;
GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(aRecipe);
@@ -187,7 +189,7 @@ public class RecipeGen_FluidCanning implements Runnable {
}
else {
Logger.INFO("[ERROR] Failed adding Extraction recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs));
- //dumpStack();
+ dumpStack();
}
return result;
}
@@ -204,7 +206,7 @@ public class RecipeGen_FluidCanning implements Runnable {
}
else {
Logger.INFO("[ERROR] Failed adding Canning recipe for "+ItemUtils.getArrayStackNames(aRecipe.mInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mOutputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidInputs)+", "+ItemUtils.getArrayStackNames(aRecipe.mFluidOutputs));
- //dumpStack();
+ dumpStack();
}
return result;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
index e87fc08c90..0661ea5ea4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
@@ -5,6 +5,8 @@ import java.util.Set;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
@@ -15,8 +17,10 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
public class RecipeGen_Fluids extends RecipeGen_Base {
public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+ private static boolean mRotorShapeEnabled = false;
static {
MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ mRotorShapeEnabled = ItemUtils.doesItemListEntryExist("Shape_Extruder_Rotor");
}
public RecipeGen_Fluids(final Material M) {
@@ -44,85 +48,6 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (material.getFluidStack(1) != null
&& !material.getFluidStack(1).getUnlocalizedName().toLowerCase().contains("plasma")) {
- if (!material.requiresBlastFurnace()) {
-
- // Ingot
- if (ItemUtils.checkForInvalidItems(material.getIngot(1)))
- if (CORE.RA.addFluidExtractionRecipe(
- material.getIngot(1), // Input
- material.getFluidStack(144), // Fluid Output
- 1 * 20, // Duration
- material.vVoltageMultiplier // 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 (ItemUtils.checkForInvalidItems(material.getPlate(1)))
- if (CORE.RA.addFluidExtractionRecipe(
- material.getPlate(1), // Input
- material.getFluidStack(144), // Fluid Output
- 1 * 20, // Duration
- material.vVoltageMultiplier // 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 (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)))
- if (CORE.RA.addFluidExtractionRecipe(
- material.getPlateDouble(1), // Input
- material.getFluidStack(288), // Fluid Output
- 1 * 20, // Duration
- material.vVoltageMultiplier // 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 (ItemUtils.checkForInvalidItems(material.getNugget(1)))
- if (CORE.RA.addFluidExtractionRecipe(
- material.getNugget(1), // Input
- material.getFluidStack(16), // Fluid Output
- 16, // Duration
- material.vVoltageMultiplier // 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 (ItemUtils.checkForInvalidItems(material.getBlock(1)))
- if (CORE.RA.addFluidExtractionRecipe(
- material.getBlock(1), // Input
- material.getFluidStack(144 * 9), // Fluid Output
- 288, // Duration
- material.vVoltageMultiplier // 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
@@ -215,6 +140,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
ItemList mold_Bolt = ItemUtils.getValueOfItemList("Shape_Mold_Bolt", null);
ItemList mold_Screw = ItemUtils.getValueOfItemList("Shape_Mold_Screw", null);
ItemList mold_Ring = ItemUtils.getValueOfItemList("Shape_Mold_Ring", null);
+ ItemList mold_Rotor = ItemUtils.getValueOfItemList("Shape_Mold_Rotor", null);
// Rod
if (ItemUtils.checkForInvalidItems(material.getRod(1)))
@@ -291,7 +217,23 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
Logger.WARNING((144 * 9) + "l fluid molder from 1 ring Recipe: " + material.getLocalizedName()
+ " - Failed");
}
+
+ // Rotor
+ if (ItemUtils.checkForInvalidItems(material.getRotor(1)))
+ if (mold_Rotor != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rotor.get(0), // Item Shape
+ material.getFluidStack(612), // Fluid Input
+ material.getRotor(1), // output
+ 100, // Duration
+ material.vVoltageMultiplier // Eu Tick
+ )) {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rotor Recipe: " + material.getLocalizedName()
+ + " - Success");
+ } else {
+ Logger.WARNING((144 * 9) + "l fluid molder from 1 rotor Recipe: " + material.getLocalizedName()
+ + " - Failed");
+ }
+
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
index 830fae78ab..bcf3ef1f9f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
@@ -1,7 +1,10 @@
package gtPlusPlus.xmod.gregtech.loaders;
import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
@@ -114,6 +117,32 @@ public class RecipeGen_MetalRecipe extends RecipeGen_Base {
else {
Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Failed");
}
+
+ // Fine Wire
+ if (ItemUtils.checkForInvalidItems(material.getFineWire(1)) && (ItemUtils.checkForInvalidItems(material.getIngot(1)) || ItemUtils.checkForInvalidItems(material.getWire01(1))))
+ if (GT_Values.RA.addWiremillRecipe(
+ ItemUtils.checkForInvalidItems(material.getWire01(1)) ? material.getWire01(1) : material.getIngot(1),
+ material.getFineWire(ItemUtils.checkForInvalidItems(material.getWire01(1)) ? 4 : 8),
+ 100,
+ 4)){
+ Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+ // Fine Wire
+ if (ItemUtils.checkForInvalidItems(material.getFineWire(1)) && (ItemUtils.checkForInvalidItems(material.getRod(1))))
+ if (GT_Values.RA.addWiremillRecipe(
+ material.getRod(1),
+ material.getFineWire(4),
+ 50,
+ 4)){
+ Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Wiremill Fine Wire Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
}
} \ No newline at end of file
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
index 5f53defc2f..7355ac7dc0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
@@ -8,6 +8,8 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.recipe.common.CI;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraft.item.ItemStack;
public class RecipeGen_Plasma extends RecipeGen_Base {
@@ -27,15 +29,18 @@ public class RecipeGen_Plasma extends RecipeGen_Base {
generateRecipes(this.toGenerate);
}
- private void generateRecipes(final Material material) {
- // Cool Plasma
- ItemStack aPlasmaCell = material.getPlasmaCell(1);
- ItemStack aCell = material.getCell(1);
- if (material.getPlasmaCell(1) != null){
- GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4);
- }
- if (material.getCell(1) != null && material.getPlasmaCell(1) != null){
- GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L));
+ private void generateRecipes(final Material material) {
+ if (material.getPlasma() != null) {
+ // Cool Plasma
+ ItemStack aPlasmaCell = material.getPlasmaCell(1);
+ ItemStack aCell = material.getCell(1);
+ ItemStack aContainerItem = GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : CI.emptyCells(1);
+ if (ItemUtils.checkForInvalidItems(new ItemStack[] {aPlasmaCell, aContainerItem})){
+ GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), aContainerItem, (int) Math.max(1024L, 1024L * material.getMass()), 4);
+ }
+ if (ItemUtils.checkForInvalidItems(new ItemStack[] {aCell, aPlasmaCell})){
+ GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L));
+ }
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
index 56d11520d0..6b512f4b3a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
@@ -6,6 +6,8 @@ import java.util.Set;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
@@ -93,7 +95,7 @@ public class RecipeGen_Plates extends RecipeGen_Base {
Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Failed");
}
@@ -121,6 +123,20 @@ public class RecipeGen_Plates extends RecipeGen_Base {
else {
Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed");
}
+
+ //Bender
+ if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getFoil(1)))
+ if (addBenderRecipe(
+ material.getPlate(1),
+ material.getFoil(4),
+ (int) Math.max(material.getMass(), 1L),
+ material.vVoltageMultiplier)){
+ GregTech_API.registerCover(material.getFoil(1), new GT_RenderedTexture(material.getTextureSet().mTextures[70], material.getRGBA(), false), null);
+ Logger.WARNING("Bender Foil Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Bender Foil Recipe: "+material.getLocalizedName()+" - Failed");
+ }
}
public static boolean addBenderRecipe(final ItemStack aInput1, final ItemStack aOutput1, int aDuration, final int aEUt) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
index acb7e5fe02..ed9203fe34 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.loaders;
+import static gregtech.api.enums.GT_Values.L;
import static gregtech.api.enums.GT_Values.M;
+import static gregtech.api.enums.GT_Values.RA;
import java.util.ArrayList;
import java.util.Map;
@@ -9,6 +11,7 @@ import org.apache.commons.lang3.reflect.FieldUtils;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
@@ -105,7 +108,7 @@ public class RecipeGen_Recycling implements Runnable {
for (final Pair<OrePrefixes, ItemStack> validPrefix : mValidPairs) {
try {
- if (material == null || validPrefix == null || material.getState() != MaterialState.SOLID || validPrefix.getKey() == OrePrefixes.ingotHot) {
+ if (material == null || validPrefix == null || (material.getState() != MaterialState.SOLID && material.getState() != MaterialState.LIQUID) || validPrefix.getKey() == OrePrefixes.ingotHot) {
continue;
}
@@ -137,9 +140,13 @@ public class RecipeGen_Recycling implements Runnable {
//Fluid Extractor
if (ItemUtils.checkForInvalidItems(tempStack)) {
// mValidItems[mSlotIndex++] = tempStack;
- if ((mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(mFluidAmount), 30, material.vVoltageMultiplier)) {
+
+ int aFluidAmount = (int) ((L * validPrefix.getKey().mMaterialAmount) / (M * tempStack.stackSize));
+ int aDuration = (int) Math.max(1, (24 * validPrefix.getKey().mMaterialAmount) / M);
+ boolean aGenFluidExtraction = CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(aFluidAmount), aDuration, material.vVoltageMultiplier);
+ if (aGenFluidExtraction/*(mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(mFluidAmount), 30, material.vVoltageMultiplier)*/) {
Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
- + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluidStack(1).getLocalizedName()+".");
+ + tempStack.getDisplayName() + " and obtain " + aFluidAmount+"mb of "+material.getFluidStack(1).getLocalizedName()+". Time: "+aDuration+", Voltage: "+material.vVoltageMultiplier);
}
else {
Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
index ea129a2b0e..1a6221b09e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java
@@ -9,6 +9,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import net.minecraft.item.ItemStack;
@@ -177,6 +178,34 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base {
Logger.WARNING("Bolt Recipe: "+material.getLocalizedName()+" - Failed");
}
}
+
+ //Shaped Recipe - Fine Wire
+ if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFoil(1)) && ItemUtils.checkForInvalidItems(material.getFineWire(1))) {
+ if (RecipeUtils.addShapedRecipe(
+ material.getFoil(1), CI.craftingToolWireCutter, null,
+ null, null, null,
+ null, null, null,
+ material.getFineWire(1))){
+ Logger.WARNING("Fine Wire Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Fine Wire Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+ }
+
+ //Shaped Recipe - Foil
+ if (ItemUtils.checkForInvalidItems(material.getFoil(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) {
+ if (RecipeUtils.addShapedRecipe(
+ CI.craftingToolHammer_Hard, material.getPlate(1), null,
+ null, null, null,
+ null, null, null,
+ material.getFoil(2))){
+ Logger.WARNING("Foil Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Foil Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+ }
//Shaped Recipe - Ingot to Rod
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_MolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_MolecularTransformer.java
new file mode 100644
index 0000000000..2ae16af406
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_MolecularTransformer.java
@@ -0,0 +1,32 @@
+package gtPlusPlus.xmod.gregtech.loaders.recipe;
+
+import static advsolar.utils.MTRecipeManager.transformerRecipes;
+
+import advsolar.utils.MTRecipeRecord;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
+
+public class RecipeLoader_MolecularTransformer {
+
+ public static void run() {
+
+ for (int i = 0; i < transformerRecipes.size(); i++) {
+ MTRecipeRecord aRecipe = transformerRecipes.get(i);
+ int aEU = MaterialUtils.getVoltageForTier(5);
+ Logger.INFO("=======================");
+ Logger.INFO("Generating GT recipe for Molecular Transformer.");
+ Logger.INFO("Input: "+aRecipe.inputStack.getDisplayName()+", Output: "+aRecipe.outputStack.getDisplayName()+", EU/t: "+aEU);
+ float aTicks = (float) aRecipe.energyPerOperation / (float) aEU;
+ Logger.INFO("Ticks: "+aTicks);
+ int aTicksRoundedUp = MathUtils.roundToClosestInt(Math.ceil(aTicks));
+ Logger.INFO("Ticks: "+aTicksRoundedUp);
+ Logger.INFO("Total EU equal or greater? "+((aTicksRoundedUp * aEU) >= aRecipe.energyPerOperation));
+ CORE.RA.addMolecularTransformerRecipe(aRecipe.inputStack, aRecipe.outputStack, aTicksRoundedUp, aEU, 2);
+ Logger.INFO("=======================");
+ }
+
+ }
+
+}