aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-11-06 19:32:27 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-11-06 19:32:27 +1000
commitcbe0e497be8e466c380a5b4fa781b314ede9ada3 (patch)
treeb85848b432adf458e3abda466ee46d9dfc3e454b /src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java
parentc40416b036c0e89451e1558253ccf07bbee028d0 (diff)
downloadGT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.gz
GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.tar.bz2
GT5-Unofficial-cbe0e497be8e466c380a5b4fa781b314ede9ada3.zip
Revert "$ Cleaned up the entire project."
This reverts commit 0669f5eb9d5029a8b94ec552171b0837605f7747. # Conflicts: # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java Revert "% Cleaned up Imports." This reverts commit 3654052fb63a571c5eaca7f20714b87c17f7e966.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java229
1 files changed, 103 insertions, 126 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java
index 8044c78a39..be2dbff77a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.loaders;
-import gregtech.api.enums.*;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
import gregtech.api.objects.MaterialStack;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.lib.CORE;
@@ -8,173 +10,157 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import net.minecraft.item.ItemStack;
-public class RecipeGen_BlastSmelterGT implements Runnable {
+public class RecipeGen_BlastSmelterGT implements Runnable{
+
+ public RecipeGen_BlastSmelterGT(){
+
+ }
+
+ @Override
+ public void run() {
+ generateRecipes();
+ }
- public static void generateRecipes() {
+ public static void generateRecipes(){
- final Materials[] GregMaterials = Materials.values();
+ Materials[] GregMaterials = Materials.values();
- for (final Materials M : GregMaterials) {
+ for (Materials M : GregMaterials){
if (M.equals(Materials.Iridium) || M.equals(Materials.Osmium) || M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
- || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)) {
-
- // Add a Blast Smelting Recipe, Let's go!
+ || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
+ || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
+ || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
+ || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium) || !M.equals(Materials.Osmiridium)
+ ){
+
+
+ //Add a Blast Smelting Recipe, Let's go!
ItemStack tStack;
- if (null != (tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, M.mSmeltInto, 1L))
- && !M.contains(SubTag.NO_SMELTING) && M.contains(SubTag.METAL)) {
+ if ((null != (tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, M.mSmeltInto, 1L))) && (!M.contains(SubTag.NO_SMELTING) && (M.contains(SubTag.METAL)))) {
- // Prepare some Variables
+ //Prepare some Variables
ItemStack[] components;
MaterialStack[] tMaterial;
- short counter = 0;
- int inputStackCount = 0;
- int fluidAmount = 0;
+ short counter=0;
+ int inputStackCount=0;
+ int fluidAmount=0;
boolean doTest = true;
- // This Bad boy here is what dictates unique recipes. Fuck
- // life, right?
+ //This Bad boy here is what dictates unique recipes. Fuck life, right?
ItemStack circuitGT = ItemUtils.getGregtechCircuit(0);
- // Set a duration
+
+ //Set a duration
int duration = 0;
- if (M.mBlastFurnaceTemp > 150) {
+ if (M.mBlastFurnaceTemp > 150){
duration = (int) Math.max(M.getMass() / 50L, 1L) * M.mBlastFurnaceTemp;
}
else {
- duration = (int) Math.max(M.getMass() / 50L, 1L) * 150;
+ duration = (int) Math.max(M.getMass() / 50L, 1L) * 150;
}
- // Make a simple one Material Materialstack[] and log it for
- // validity.
- tMaterial = new MaterialStack[] {
- new MaterialStack(M, 1)
- };
+
+ //Make a simple one Material Materialstack[] and log it for validity.
+ tMaterial = new MaterialStack[]{new MaterialStack(M, 1)};
circuitGT = ItemUtils.getGregtechCircuit(1);
- final ItemStack[] tItemStackTest = new ItemStack[] {
- circuitGT, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust" + M, 1)
- };
+ ItemStack[] tItemStackTest = new ItemStack[]{circuitGT, ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+M, 1)};
inputStackCount = 1;
- fluidAmount = 144 * inputStackCount;
- Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for " + M + ". Gives " + fluidAmount
- + "L of molten metal.");
- Utils.LOG_WARNING("tMaterial.length: " + tMaterial.length + ".");
- for (int das = 0; das < tItemStackTest.length; das++) {
- if (tItemStackTest[das] != null) {
- Utils.LOG_WARNING("tMaterial[" + das + "]: " + tItemStackTest[das].getDisplayName()
- + " Meta: " + tItemStackTest[das].getItemDamage() + ", Amount: "
- + tItemStackTest[das].stackSize);
- }
+ fluidAmount = 144*inputStackCount;
+ Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for "+M+". Gives "+fluidAmount+"L of molten metal.");
+ Utils.LOG_WARNING("tMaterial.length: "+tMaterial.length+".");
+ for (int das=0;das<tItemStackTest.length;das++){
+ if (tItemStackTest[das] != null)
+ Utils.LOG_WARNING("tMaterial["+das+"]: "+tItemStackTest[das].getDisplayName()+" Meta: "+tItemStackTest[das].getItemDamage()+", Amount: "+tItemStackTest[das].stackSize);
}
- // Generate Recipes for all singular materials that can be
- // made molten.
+ //Generate Recipes for all singular materials that can be made molten.
if (M.mBlastFurnaceRequired) {
- doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration,
- 240);
+ doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration, 240);
}
else {
- doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100,
- duration / 2, 120);
+ doTest = CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getMolten(fluidAmount), 100, duration/2, 120);
}
- if (doTest) {
- // Reset the Variables for compounds if last recipe was
- // a success.
- inputStackCount = 0;
- counter = 0;
+ if (doTest){
+ //Reset the Variables for compounds if last recipe was a success.
+ inputStackCount=0;
+ counter=0;
+
- int mMaterialListSize = 0;
- for (final MaterialStack ternkfsdf : M.mMaterialList) {
+ int mMaterialListSize=0;
+ for (MaterialStack ternkfsdf:M.mMaterialList){
mMaterialListSize++;
}
- Utils.LOG_WARNING("Size: " + mMaterialListSize);
- // If this Material has some kind of compound list,
- // proceed
- if (mMaterialListSize > 1) {
- final MaterialStack[] tempStack = new MaterialStack[mMaterialListSize];
+ Utils.LOG_WARNING("Size: "+mMaterialListSize);
+ //If this Material has some kind of compound list, proceed
+ if (mMaterialListSize > 1){
+ MaterialStack[] tempStack = new MaterialStack[mMaterialListSize];
circuitGT = ItemUtils.getGregtechCircuit(mMaterialListSize);
- // Just double checking
- if (tempStack.length > 1) {
-
- // Builds me a MaterialStack[] from the
- // MaterialList of M.
- int ooo = 0;
- for (final MaterialStack xMaterial : M.mMaterialList) {
- Utils.LOG_WARNING("FOUND: " + xMaterial.mMaterial);
- Utils.LOG_WARNING("ADDING: " + xMaterial.mMaterial);
+ //Just double checking
+ if (tempStack.length > 1){
+
+ //Builds me a MaterialStack[] from the MaterialList of M.
+ int ooo=0;
+ for (MaterialStack xMaterial : M.mMaterialList){
+ Utils.LOG_WARNING("FOUND: "+xMaterial.mMaterial);
+ Utils.LOG_WARNING("ADDING: "+xMaterial.mMaterial);
tempStack[ooo] = M.mMaterialList.get(ooo);
ooo++;
}
- // Builds me an ItemStack[] of the materials. -
- // Without a circuit - this gets a good count
- // for the 144L fluid multiplier
+ //Builds me an ItemStack[] of the materials. - Without a circuit - this gets a good count for the 144L fluid multiplier
components = new ItemStack[tempStack.length];
- for (final MaterialStack aOutputPart : tempStack) {
- if (aOutputPart != null) {
- Utils.LOG_WARNING("Finding dust: " + aOutputPart.mMaterial);
- final ItemStack rStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken(
- "dust" + aOutputPart.mMaterial, (int) aOutputPart.mAmount);
- if (rStack != null) {
- Utils.LOG_WARNING("Found dust: " + aOutputPart.mMaterial);
+ for (MaterialStack aOutputPart : tempStack){
+ if (aOutputPart != null){
+ Utils.LOG_WARNING("Finding dust: "+aOutputPart.mMaterial);
+ ItemStack rStack = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dust"+aOutputPart.mMaterial, (int) aOutputPart.mAmount);
+ if (rStack != null){
+ Utils.LOG_WARNING("Found dust: "+aOutputPart.mMaterial);
components[counter] = rStack;
- inputStackCount = inputStackCount + rStack.stackSize;
+ inputStackCount = inputStackCount+rStack.stackSize;
}
- }
- counter++;
+ }
+ counter++;
}
- if (mMaterialListSize > 0 && mMaterialListSize < 9) {
- final ItemStack[] components_NoCircuit = components;
- // Builds me an ItemStack[] of the
- // materials. - With a circuit
- components = new ItemStack[components_NoCircuit.length + 1];
- for (int fr = 0; fr < components.length; fr++) {
- if (fr == 0) {
+
+ if (mMaterialListSize > 0 && mMaterialListSize < 9){
+ ItemStack[] components_NoCircuit = components;
+ //Builds me an ItemStack[] of the materials. - With a circuit
+ components = new ItemStack[components_NoCircuit.length+1];
+ for (int fr=0;fr<components.length;fr++){
+ if (fr==0){
components[0] = circuitGT;
}
else {
- components[fr] = components_NoCircuit[fr - 1];
- }
+ components[fr] = components_NoCircuit[fr-1];
+ }
}
}
- /*
- * //Add a shapeless recipe for each dust this
- * way - Compat mode. ItemStack outputStack =
- * tStack; outputStack.stackSize =
- * mMaterialListSize;
- * RecipeUtils.buildShapelessRecipe(outputStack,
- * components);
- */
-
- // Set Fluid output
- fluidAmount = 144 * inputStackCount;
-
- Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for " + M
- + " using it's compound dusts. This material has " + inputStackCount
- + " parts. Gives " + fluidAmount + "L of molten metal.");
- Utils.LOG_WARNING("tMaterial.length: " + components.length + ".");
- for (int das = 0; das < components.length; das++) {
- if (components[das] != null) {
- Utils.LOG_WARNING("tMaterial[" + das + "]: " + components[das].getDisplayName()
- + " Meta: " + components[das].getItemDamage() + ", Amount: "
- + components[das].stackSize);
- }
+ /*//Add a shapeless recipe for each dust this way - Compat mode.
+ ItemStack outputStack = tStack;
+ outputStack.stackSize = mMaterialListSize;
+ RecipeUtils.buildShapelessRecipe(outputStack, components);*/
+
+
+
+ //Set Fluid output
+ fluidAmount = 144*inputStackCount;
+
+
+ Utils.LOG_WARNING("Adding an Alloy Blast Smelter Recipe for "+M+" using it's compound dusts. This material has "+ inputStackCount+" parts. Gives "+fluidAmount+"L of molten metal.");
+ Utils.LOG_WARNING("tMaterial.length: "+components.length+".");
+ for (int das=0;das<components.length;das++){
+ if (components[das] != null)
+ Utils.LOG_WARNING("tMaterial["+das+"]: "+components[das].getDisplayName()+" Meta: "+components[das].getItemDamage()+", Amount: "+components[das].stackSize);
}
if (M.mBlastFurnaceRequired) {
- CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration,
- 500);
+ CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 500);
}
else {
- CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration,
- 240);
+ CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 240);
}
}
}
@@ -183,13 +169,4 @@ public class RecipeGen_BlastSmelterGT implements Runnable {
}
}
}
-
- public RecipeGen_BlastSmelterGT() {
-
- }
-
- @Override
- public void run() {
- RecipeGen_BlastSmelterGT.generateRecipes();
- }
}