aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java206
1 files changed, 109 insertions, 97 deletions
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 11475c1024..83bbe6a6d7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
@@ -80,27 +80,32 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
int mCounter = 0;
for (Pair<Integer, Material> f : componentMap) {
- if (f.getValue().getState() != MaterialState.SOLID) {
+ if (f.getValue()
+ .getState() != MaterialState.SOLID) {
Logger.MATERIALS(
- "[Centrifuge] Found Fluid Component, adding " + f.getKey()
- + " cells of "
- + f.getValue().getLocalizedName()
- + ".");
- mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey());
+ "[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(
- "[Centrifuge] In total, adding " + mCellCount
- + " cells for "
- + material.getLocalizedName()
- + " processing.");
+ "[Centrifuge] In total, adding " + mCellCount
+ + " cells for "
+ + material.getLocalizedName()
+ + " processing.");
} else {
Logger.MATERIALS(
- "[Centrifuge] Found Solid Component, adding " + f.getKey()
- + " dusts of "
- + f.getValue().getLocalizedName()
- + ".");
- mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey());
+ "[Centrifuge] Found Solid Component, adding " + f.getKey()
+ + " dusts of "
+ + f.getValue()
+ .getLocalizedName()
+ + ".");
+ mInternalOutputs[mCounter++] = f.getValue()
+ .getDust(f.getKey());
mTotalCount += f.getKey();
}
}
@@ -108,9 +113,9 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
// Build Output Array
for (int g = 0; g < mInternalOutputs.length; g++) {
Logger.MATERIALS(
- "[Centrifuge] Is output[" + g
- + "] valid with a chance? "
- + (mInternalOutputs[g] != null ? 10000 : 0));
+ "[Centrifuge] Is output[" + g
+ + "] valid with a chance? "
+ + (mInternalOutputs[g] != null ? 10000 : 0));
mChances[g] = (mInternalOutputs[g] != null ? 10000 : 0);
}
@@ -123,19 +128,19 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing);
if (mainDust != null) {
Logger.MATERIALS(
- "[Centrifuge] Recipe now requires " + material.smallestStackSizeWhenProcessing
- + "x "
- + mainDust.getDisplayName()
- + " as input.");
+ "[Centrifuge] Recipe now requires " + material.smallestStackSizeWhenProcessing
+ + "x "
+ + mainDust.getDisplayName()
+ + " as input.");
} else {
mainDust = material.getDust(mTotalCount);
Logger.MATERIALS("[Centrifuge] Could not find valid input dust, trying alternative.");
if (mainDust != null) {
Logger.MATERIALS(
- "[Centrifuge] Recipe now requires " + mTotalCount
- + "x "
- + mainDust.getDisplayName()
- + " as input.");
+ "[Centrifuge] Recipe now requires " + mTotalCount
+ + "x "
+ + mainDust.getDisplayName()
+ + " as input.");
} else {
Logger.MATERIALS("[Centrifuge] Could not find valid input dust, exiting.");
}
@@ -147,39 +152,40 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
Logger.MATERIALS("[Centrifuge] Set slot " + j + " to null.");
} else {
Logger.MATERIALS(
- "[Centrifuge] Set slot " + j + " to " + mInternalOutputs[j].getDisplayName() + ".");
+ "[Centrifuge] Set slot " + j + " to " + mInternalOutputs[j].getDisplayName() + ".");
}
}
try {
if (addCentrifgeRecipe(
- mainDust,
- emptyCell, // input 2
- null, // Input fluid 1
- null, // Output fluid 1
- mInternalOutputs[0],
- mInternalOutputs[1],
- mInternalOutputs[2],
- mInternalOutputs[3],
- mInternalOutputs[4],
- mInternalOutputs[5],
- mChances,
- 20 * 1 * (tVoltageMultiplier / 10),
- tVoltageMultiplier)) {
+ mainDust,
+ emptyCell, // input 2
+ null, // Input fluid 1
+ null, // Output fluid 1
+ mInternalOutputs[0],
+ mInternalOutputs[1],
+ mInternalOutputs[2],
+ mInternalOutputs[3],
+ mInternalOutputs[4],
+ mInternalOutputs[5],
+ mChances,
+ 20 * 1 * (tVoltageMultiplier / 10),
+ tVoltageMultiplier)) {
Logger.MATERIALS(
- "[Centrifuge] Generated Centrifuge recipe for " + material.getDust(1).getDisplayName());
+ "[Centrifuge] Generated Centrifuge recipe for " + material.getDust(1)
+ .getDisplayName());
} else {
Logger.MATERIALS(
- "[Centrifuge] Failed to generate Centrifuge recipe for "
- + material.getDust(1).getDisplayName());
+ "[Centrifuge] Failed to generate Centrifuge recipe for " + material.getDust(1)
+ .getDisplayName());
}
} catch (Throwable t) {
t.printStackTrace();
}
} else if (componentMap.size() > 6 && componentMap.size() <= 9) {
Logger.MATERIALS(
- "[Issue][Electrolyzer] " + material.getLocalizedName()
- + " is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead.");
+ "[Issue][Electrolyzer] " + material.getLocalizedName()
+ + " is composed of over 6 materials, so an electrolyzer recipe for processing cannot be generated. Trying to create one for the Dehydrator instead.");
ItemStack mInternalOutputs[] = new ItemStack[9];
int mChances[] = new int[9];
@@ -189,27 +195,32 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
int mCounter = 0;
for (Pair<Integer, Material> f : componentMap) {
- if (f.getValue().getState() != MaterialState.SOLID) {
+ if (f.getValue()
+ .getState() != MaterialState.SOLID) {
Logger.MATERIALS(
- "[Dehydrator] Found Fluid Component, adding " + f.getKey()
- + " cells of "
- + f.getValue().getLocalizedName()
- + ".");
- mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey());
+ "[Dehydrator] 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(
- "[Dehydrator] In total, adding " + mCellCount
- + " cells for "
- + material.getLocalizedName()
- + " processing.");
+ "[Dehydrator] In total, adding " + mCellCount
+ + " cells for "
+ + material.getLocalizedName()
+ + " processing.");
} else {
Logger.MATERIALS(
- "[Dehydrator] Found Solid Component, adding " + f.getKey()
- + " dusts of "
- + f.getValue().getLocalizedName()
- + ".");
- mInternalOutputs[mCounter++] = f.getValue().getDust(f.getKey());
+ "[Dehydrator] Found Solid Component, adding " + f.getKey()
+ + " dusts of "
+ + f.getValue()
+ .getLocalizedName()
+ + ".");
+ mInternalOutputs[mCounter++] = f.getValue()
+ .getDust(f.getKey());
mTotalCount += f.getKey();
}
}
@@ -217,9 +228,9 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
// Build Output Array
for (int g = 0; g < mInternalOutputs.length; g++) {
Logger.MATERIALS(
- "[Dehydrator] Is output[" + g
- + "] valid with a chance? "
- + (mInternalOutputs[g] != null ? 10000 : 0));
+ "[Dehydrator] Is output[" + g
+ + "] valid with a chance? "
+ + (mInternalOutputs[g] != null ? 10000 : 0));
mChances[g] = (mInternalOutputs[g] != null ? 10000 : 0);
}
@@ -232,19 +243,19 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
ItemStack mainDust = material.getDust(material.smallestStackSizeWhenProcessing);
if (mainDust != null) {
Logger.MATERIALS(
- "[Dehydrator] Recipe now requires " + material.smallestStackSizeWhenProcessing
- + "x "
- + mainDust.getDisplayName()
- + " as input.");
+ "[Dehydrator] Recipe now requires " + material.smallestStackSizeWhenProcessing
+ + "x "
+ + mainDust.getDisplayName()
+ + " as input.");
} else {
mainDust = material.getDust(mTotalCount);
Logger.MATERIALS("[Dehydrator] Could not find valid input dust, trying alternative.");
if (mainDust != null) {
Logger.MATERIALS(
- "[Dehydrator] Recipe now requires " + mTotalCount
- + "x "
- + mainDust.getDisplayName()
- + " as input.");
+ "[Dehydrator] Recipe now requires " + mTotalCount
+ + "x "
+ + mainDust.getDisplayName()
+ + " as input.");
} else {
Logger.MATERIALS("[Dehydrator] Could not find valid input dust, exiting.");
}
@@ -256,26 +267,27 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
Logger.MATERIALS("[Dehydrator] Set slot " + j + " to null.");
} else {
Logger.MATERIALS(
- "[Dehydrator] Set slot " + j + " to " + mInternalOutputs[j].getDisplayName() + ".");
+ "[Dehydrator] Set slot " + j + " to " + mInternalOutputs[j].getDisplayName() + ".");
}
}
try {
if (CORE.RA.addDehydratorRecipe(
- new ItemStack[] { mainDust, emptyCell },
- null,
- null,
- mInternalOutputs,
- mChances,
- 20 * 1 * (tVoltageMultiplier / 10),
- tVoltageMultiplier)) {
+ new ItemStack[] { mainDust, emptyCell },
+ null,
+ null,
+ mInternalOutputs,
+ mChances,
+ 20 * 1 * (tVoltageMultiplier / 10),
+ tVoltageMultiplier)) {
Logger.MATERIALS(
- "[Dehydrator] Generated Dehydrator recipe for " + material.getDust(1).getDisplayName());
+ "[Dehydrator] Generated Dehydrator recipe for " + material.getDust(1)
+ .getDisplayName());
} else {
Logger.MATERIALS(
- "[Dehydrator] Failed to generate Dehydrator recipe for "
- + material.getDust(1).getDisplayName());
+ "[Dehydrator] Failed to generate Dehydrator recipe for " + material.getDust(1)
+ .getDisplayName());
}
} catch (Throwable t) {
t.printStackTrace();
@@ -286,21 +298,21 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
@Deprecated
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) {
+ 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);
+ aInput1,
+ aInput2,
+ aFluidInput,
+ aFluidOutput,
+ aOutput1,
+ aOutput2,
+ aOutput3,
+ aOutput4,
+ aOutput5,
+ aOutput6,
+ aChances,
+ aDuration,
+ aEUt);
}
}