aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders
diff options
context:
space:
mode:
authorJohann Bernhardt <johann.bernhardt@tum.de>2021-12-13 23:39:55 +0100
committerJohann Bernhardt <johann.bernhardt@tum.de>2021-12-13 23:39:55 +0100
commita2a9ad400f23726885020f1a77627f9561487948 (patch)
tree9116c76f46d49d951ac63442af335a0bd6016052 /src/main/java/gtPlusPlus/xmod/gregtech/loaders
parent20b5d2932ef44e1c96104d6ec0528012f5c83d21 (diff)
parent868ddab78797403d58dbc84d357f792926e94f42 (diff)
downloadGT5-Unofficial-a2a9ad400f23726885020f1a77627f9561487948.tar.gz
GT5-Unofficial-a2a9ad400f23726885020f1a77627f9561487948.tar.bz2
GT5-Unofficial-a2a9ad400f23726885020f1a77627f9561487948.zip
Merge tag '1.7.20' into unified-build-script2
# Conflicts: # build.properties # src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java224
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java68
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java29
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java39
4 files changed, 278 insertions, 82 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java
new file mode 100644
index 0000000000..b285d41652
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluorite.java
@@ -0,0 +1,224 @@
+package gtPlusPlus.xmod.gregtech.loaders;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.interfaces.RunnableWithInfo;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.material.MaterialStack;
+import gtPlusPlus.core.material.nuclear.FLUORIDES;
+import gtPlusPlus.core.material.state.MaterialState;
+import gtPlusPlus.core.recipe.common.CI;
+import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import gtPlusPlus.core.util.minecraft.RecipeUtils;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class RecipeGen_Fluorite extends RecipeGen_Base {
+
+ public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+
+ static {
+ MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ }
+
+ public RecipeGen_Fluorite(final Material material){
+ this.toGenerate = material;
+ mRecipeGenMap.add(this);
+
+
+ /**
+ * Shaped Crafting
+ */
+ RecipeUtils.addShapedRecipe(
+ CI.craftingToolHammer_Hard, null, null,
+ material.getCrushedPurified(1), null, null,
+ null, null, null,
+ material.getDustPurified(1));
+
+ RecipeUtils.addShapedRecipe(
+ CI.craftingToolHammer_Hard, null, null,
+ material.getCrushed(1), null, null,
+ null, null, null,
+ material.getDustImpure(1));
+
+ RecipeUtils.addShapedRecipe(
+ CI.craftingToolHammer_Hard, null, null,
+ material.getCrushedCentrifuged(1), null, null,
+ null, null, null,
+ material.getDust(1));
+
+
+
+ final ItemStack normalDust = material.getDust(1);
+ final ItemStack smallDust = material.getSmallDust(1);
+ final ItemStack tinyDust = material.getTinyDust(1);
+
+ if (RecipeUtils.addShapedRecipe(
+ tinyDust, tinyDust, tinyDust,
+ tinyDust, tinyDust, tinyDust,
+ tinyDust, tinyDust, tinyDust,
+ normalDust)){
+ Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (RecipeUtils.addShapedRecipe(
+ normalDust, null, null,
+ null, null, null,
+ null, null, null,
+ material.getTinyDust(9))){
+ Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (RecipeUtils.addShapedRecipe(
+ smallDust, smallDust, null,
+ smallDust, smallDust, null,
+ null, null, null,
+ normalDust)){
+ Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (RecipeUtils.addShapedRecipe(
+ null, normalDust, null,
+ null, null, null,
+ null, null, null,
+ material.getSmallDust(4))){
+ Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+ }
+
+ @Override
+ public void run() {
+ generateRecipes(this.toGenerate);
+ }
+
+ public static void generateRecipes(final Material material){
+
+ int tVoltageMultiplier = MaterialUtils.getVoltageForTier(material.vTier);
+
+ final ItemStack dustStone = ItemUtils.getItemStackOfAmountFromOreDict("dustStone", 1);
+
+
+ ItemStack tinyDustA = FLUORIDES.FLUORITE.getTinyDust(1);
+ ItemStack tinyDustB = FLUORIDES.FLUORITE.getTinyDust(1);
+ ItemStack matDust = FLUORIDES.FLUORITE.getDust(1);
+ ItemStack matDustA = FLUORIDES.FLUORITE.getDust(1);
+
+ /**
+ * Package
+ */
+ //Allow ore dusts to be packaged
+ if (ItemUtils.checkForInvalidItems(material.getSmallDust(1)) && ItemUtils.checkForInvalidItems(material.getTinyDust(1))) {
+ RecipeGen_DustGeneration.generatePackagerRecipes(material);
+ }
+
+
+ /**
+ * 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 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'");
+ }
+ if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), (int) Math.min(5000L, Math.abs(material.getMass() * 20L)), 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()+".");
+ }
+
+ GT_Values.RA.addChemicalBathRecipe(
+ FLUORIDES.FLUORITE.getCrushed(2),
+ FluidUtils.getFluidStack("hydrogen", 2000),
+ FLUORIDES.FLUORITE.getCrushedPurified(8),
+ FLUORIDES.FLUORITE.getDustImpure(4),
+ FLUORIDES.FLUORITE.getDustPurified(2),
+ new int[] { 10000, 5000, 1000 },
+ 30 * 20,
+ 240);
+
+ /**
+ * Forge Hammer
+ */
+ if (GT_Values.RA.addForgeHammerRecipe(material.getCrushedCentrifuged(1), matDust, 10, tVoltageMultiplier/4)){
+ Logger.MATERIALS("[ForgeHammer] Added Recipe: 'Crushed Centrifuged to Pure Dust'");
+ }
+
+ /**
+ * Centrifuge
+ */
+ //Purified Dust to Clean
+ if (GT_Values.RA.addCentrifugeRecipe(
+ material.getDustPurified(1), null,
+ null, //In Fluid
+ null, //Out Fluid
+ matDust, tinyDustA,null,
+ null, null,null,
+ new int[]{10000, 10000}, //Chances
+ (int) Math.max(1L, material.getMass() * 8L), //Time
+ tVoltageMultiplier/2)){ //Eu
+ Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust");
+ }
+
+ //Impure Dust to Clean
+ if (GT_Values.RA.addCentrifugeRecipe(
+ material.getDustImpure(1), null,
+ null, //In Fluid
+ null, //Out Fluid
+ matDust, tinyDustB,null,
+ null, null,null,
+ new int[]{10000, 10000}, //Chances
+ (int) Math.max(1L, material.getMass() * 8L), //Time
+ tVoltageMultiplier/2)){ //Eu
+ Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust");
+ }
+
+ // CaF2 + H2SO4 → CaSO4(solid) + 2 HF
+ FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 16000);
+ if (aGregtechHydro == null) {
+ aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid", 16000);
+ }
+
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(5),
+ FLUORIDES.FLUORITE.getDust(37),
+ },
+ FluidUtils.getFluidStack("sulfuricacid", 8000),
+ aGregtechHydro, // Fluid output (slot 2)
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumSulfate", 15),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 2),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 2)
+ },
+ new int[] { 10000, 1000, 1000, 3000, 2000 },
+ 10 * 60 * 20,
+ 240); // EU
+
+ }
+
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
index f8108852f4..92d7f73ba4 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
@@ -3,12 +3,7 @@ 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.util.GT_Recipe;
-
import gtPlusPlus.api.interfaces.RunnableWithInfo;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
@@ -20,6 +15,7 @@ import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
@@ -30,16 +26,24 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
}
public RecipeGen_MaterialProcessing(final Material M){
- this.toGenerate = M;
+ this(M, false);
+ }
+
+ public RecipeGen_MaterialProcessing(final Material M, final boolean O){
+ this.toGenerate = M;
+ this.disableOptional = O;
mRecipeGenMap.add(this);
}
@Override
public void run() {
- generateRecipes(this.toGenerate);
+ generateRecipes(this.toGenerate, this.disableOptional);
}
- private void generateRecipes(final Material material){
+ private void generateRecipes(final Material material, final boolean disableOptional){
+ if (disableOptional) {
+ return;
+ }
if (material.getMaterialComposites().length > 1){
Logger.MATERIALS("[Recipe Generator Debug] ["+material.getLocalizedName()+"]");
@@ -65,7 +69,7 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
/**
- * Electrolyzer
+ * Centrifuge
*/
//Process Dust
@@ -79,14 +83,14 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
int mCounter = 0;
for (Pair<Integer, Material> f : componentMap){
if (f.getValue().getState() != MaterialState.SOLID){
- Logger.MATERIALS("[Electrolyzer] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+".");
+ Logger.MATERIALS("[Centrifuge] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+".");
mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey());
mCellCount += f.getKey();
mTotalCount += f.getKey();
- Logger.MATERIALS("[Electrolyzer] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing.");
+ Logger.MATERIALS("[Centrifuge] In total, adding "+mCellCount+" cells for "+material.getLocalizedName()+" processing.");
}
else {
- Logger.MATERIALS("[Electrolyzer] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+".");
+ Logger.MATERIALS("[Centrifuge] Found Solid Component, adding "+f.getKey()+" dusts of "+f.getValue().getLocalizedName()+".");
mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey());
mTotalCount += f.getKey();
}
@@ -94,38 +98,38 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
//Build Output Array
for (int g=0;g<mInternalOutputs.length;g++){
- Logger.MATERIALS("[Electrolyzer] Is output["+g+"] valid with a chance? "+(mInternalOutputs[g] != null ? 10000 : 0));
+ Logger.MATERIALS("[Centrifuge] Is output["+g+"] valid with a chance? "+(mInternalOutputs[g] != null ? 10000 : 0));
mChances[g] = (mInternalOutputs[g] != null ? 10000 : 0);
}
ItemStack emptyCell = null;
if (mCellCount > 0){
emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount);
- Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mCellCount+" empty cells as input.");
+ Logger.MATERIALS("[Centrifuge] Recipe now requires "+mCellCount+" empty cells as input.");
}
ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing);
if (mainDust != null){
- Logger.MATERIALS("[Electrolyzer] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input.");
+ Logger.MATERIALS("[Centrifuge] Recipe now requires "+material.smallestStackSizeWhenProcessing+"x "+mainDust.getDisplayName()+" as input.");
}
else {
mainDust = material.getDust(mTotalCount);
- Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, trying alternative.");
+ Logger.MATERIALS("[Centrifuge] Could not find valid input dust, trying alternative.");
if (mainDust != null){
- Logger.MATERIALS("[Electrolyzer] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input.");
+ Logger.MATERIALS("[Centrifuge] Recipe now requires "+mTotalCount+"x "+mainDust.getDisplayName()+" as input.");
}
else {
- Logger.MATERIALS("[Electrolyzer] Could not find valid input dust, exiting.");
+ Logger.MATERIALS("[Centrifuge] Could not find valid input dust, exiting.");
}
}
for (int j=0;j<mInternalOutputs.length;j++){
if (mInternalOutputs[j] == null){
mInternalOutputs[j] = GT_Values.NI;
- Logger.MATERIALS("[Electrolyzer] Set slot "+j+" to null.");
+ Logger.MATERIALS("[Centrifuge] Set slot "+j+" to null.");
}
else {
- Logger.MATERIALS("[Electrolyzer] Set slot "+j+" to "+mInternalOutputs[j].getDisplayName()+".");
+ Logger.MATERIALS("[Centrifuge] Set slot "+j+" to "+mInternalOutputs[j].getDisplayName()+".");
}
}
@@ -144,10 +148,10 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
mChances,
20*1*(tVoltageMultiplier/10),
tVoltageMultiplier)){
- Logger.MATERIALS("[Electrolyzer] Generated Electrolyzer recipe for "+material.getDust(1).getDisplayName());
+ Logger.MATERIALS("[Centrifuge] Generated Centrifuge recipe for "+material.getDust(1).getDisplayName());
}
else {
- Logger.MATERIALS("[Electrolyzer] Failed to generate Electrolyzer recipe for "+material.getDust(1).getDisplayName());
+ Logger.MATERIALS("[Centrifuge] Failed to generate Centrifuge recipe for "+material.getDust(1).getDisplayName());
}
}
catch(Throwable t){
@@ -252,23 +256,5 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
public static boolean addCentrifgeRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) {
return GT_Values.RA.addCentrifugeRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, aChances, aDuration, aEUt);
}
-
- public static boolean addElectrolyzerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int[] aChances, int aDuration, int aEUt) {
- if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
- Logger.MATERIALS("[Electrolyzer] Either both inputs or outputs are null.");
- return false;
- }
- if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) {
- Logger.MATERIALS("[Electrolyzer] Fail 1.");
- return false;
- }
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aFluidInput.getFluid().getName(), aDuration)) <= 0)) {
- Logger.MATERIALS("[Electrolyzer] Fail 2.");
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sElectrolyzerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- Logger.MATERIALS("[Electrolyzer] Recipe added.");
- return true;
- }
-
+
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
index b7043b5983..f3ff935d6e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
@@ -33,20 +33,25 @@ public class RecipeGen_Ore extends RecipeGen_Base {
static {
MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
}
-
+
public RecipeGen_Ore(final Material M){
+ this(M, false);
+ }
+
+ public RecipeGen_Ore(final Material M, final boolean O){
this.toGenerate = M;
+ this.disableOptional = O;
mRecipeGenMap.add(this);
}
@Override
public void run() {
- generateRecipes(this.toGenerate);
+ generateRecipes(this.toGenerate, this.disableOptional);
}
private static Material mStone;
- public static void generateRecipes(final Material material){
+ private void generateRecipes(final Material material, final boolean disableOptional){
if (mStone == null) {
mStone = MaterialUtils.generateMaterialFromGtENUM(Materials.Stone);
@@ -225,13 +230,13 @@ public class RecipeGen_Ore extends RecipeGen_Base {
try {
//.08 compat
- if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), 200, material.getCrushedCentrifuged(1), tinyDustB, dustStone)){
+ if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushed(1), (int) Math.min(5000L, Math.abs(material.getMass() * 20L)), 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)){
+ if (GT_ModHandler.addThermalCentrifugeRecipe(material.getCrushedPurified(1), (int) Math.min(5000L, Math.abs(material.getMass() * 20L)), 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()+".");
}
}
@@ -262,7 +267,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
matDust, tinyDustA,null,
null, null,null,
new int[]{10000, 10000}, //Chances
- 5*20, //Time
+ (int) Math.max(1L, material.getMass() * 8L), //Time
tVoltageMultiplier/2)){ //Eu
Logger.MATERIALS("[Centrifuge] Added Recipe: Purified Dust to Clean Dust");
}
@@ -275,7 +280,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
matDust, tinyDustB,null,
null, null,null,
new int[]{10000, 10000}, //Chances
- 5*20, //Time
+ (int) Math.max(1L, material.getMass() * 8L), //Time
tVoltageMultiplier/2)){ //Eu
Logger.MATERIALS("[Centrifuge] Added Recipe: Inpure Dust to Clean Dust");
}
@@ -285,6 +290,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
* Electrolyzer
*/
+ if (!disableOptional) {
//Process Dust
if (componentMap.size() > 0 && componentMap.size() <= 6){
@@ -434,9 +440,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
}
}
- try{
-
-
+ try{
if (CORE.RA.addDehydratorRecipe(
new ItemStack[]{mainDust, emptyCell},
null,
@@ -446,6 +450,10 @@ public class RecipeGen_Ore extends RecipeGen_Base {
(int) Math.max(material.getMass() * 4L * 1, 1),
tVoltageMultiplier)){
Logger.MATERIALS("[Dehydrator] Generated Dehydrator recipe for "+matDust.getDisplayName());
+ Logger.MATERIALS("Inputs: "+mainDust.getDisplayName()+" x"+mainDust.stackSize+", "+(emptyCell == null ? "No Cells" : ""+emptyCell.getDisplayName()+" x"+emptyCell.stackSize));
+ Logger.MATERIALS("Outputs "+ItemUtils.getArrayStackNames(mInternalOutputs));
+ Logger.MATERIALS("Time: "+((int) Math.max(material.getMass() * 4L * 1, 1)));
+ Logger.MATERIALS("EU: "+tVoltageMultiplier);
}
else {
Logger.MATERIALS("[Dehydrator] Failed to generate Dehydrator recipe for "+matDust.getDisplayName());
@@ -457,6 +465,7 @@ public class RecipeGen_Ore extends RecipeGen_Base {
}
+ }
/**
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
index e84ce73a47..2e6de159d0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/misc/AddCustomMachineToPA.java
@@ -1,51 +1,28 @@
package gtPlusPlus.xmod.gregtech.loaders.misc;
-import java.lang.reflect.Method;
-
import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_ProcessingArray_Manager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.api.objects.Logger;
public class AddCustomMachineToPA {
- private static final boolean sDoesPatchExist;
- private static final Class sManagerPA;
- private static final Method sRegisterRecipeMapForMeta;
-
- static {
- sDoesPatchExist = ReflectionUtils.doesClassExist("gregtech.api.util.GT_ProcessingArray_Manager");
- if (sDoesPatchExist) {
- sManagerPA = ReflectionUtils.getClass("gregtech.api.util.GT_ProcessingArray_Manager");
- sRegisterRecipeMapForMeta = ReflectionUtils.getMethod(sManagerPA, "registerRecipeMapForMeta", int.class, GT_Recipe_Map.class);
- }
- else {
- sManagerPA = null;
- sRegisterRecipeMapForMeta = null;
- }
- }
-
public static final void registerRecipeMapForID(int aID, GT_Recipe_Map aMap) {
- if (sDoesPatchExist) {
- ReflectionUtils.invokeNonBool(null, sRegisterRecipeMapForMeta, new Object[] {aID, aMap});
- }
-
+ Logger.INFO("Attempting to add map "+aMap.mNEIName+" to Processing Array for Meta Tile "+aID+". Success? "+GT_ProcessingArray_Manager.registerRecipeMapForMeta(aID, aMap));
}
public static final void registerRecipeMapBetweenRangeOfIDs(int aMin, int aMax, GT_Recipe_Map aMap) {
- if (sDoesPatchExist) {
- for (int i=aMin; i<=aMax;i++) {
- ReflectionUtils.invokeNonBool(null, sRegisterRecipeMapForMeta, new Object[] {i, aMap});
- //GT_ProcessingArray_Manager.registerRecipeMapForMeta(i, aMap);
- }
- }
+ for (int i=aMin; i<=aMax;i++) {
+ registerRecipeMapForID(i, aMap);
+ }
}
public static void register() {
-
+
// Simple Washers
registerRecipeMapForID(767, GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes);
registerRecipeMapBetweenRangeOfIDs(31017, 31020, GTPP_Recipe.GTPP_Recipe_Map.sSimpleWasherRecipes);
-
+
}
}