aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java19
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java95
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java27
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java2
4 files changed, 28 insertions, 115 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
index 4a508f2f0f..d60e248ac1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
@@ -1,10 +1,5 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
-import static gregtech.api.enums.GT_Values.E;
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-import java.util.HashSet;
-
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -12,8 +7,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.CustomRecipeMap;
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GTPP_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
@@ -72,16 +66,9 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
return "MatterFabricator";
}
- private static final GT_Recipe_Map mGregTypeRecipeMap = new GT_Recipe_Map(new HashSet<GT_Recipe>(), "internal.recipe.fissionfuel", "Nuclear Fuel Processing", null, RES_PATH_GUI + "basicmachines/FissionFuel", 0, 0, 0, 4, 1, E, 1, E, true, false);
-
@Override
public GT_Recipe_Map getRecipeMap() {
- if (mGregTypeRecipeMap.mRecipeList.size() <= 0) {
- for (GT_Recipe g : CustomRecipeMap.sFissionFuelProcessing.mRecipeList) {
- mGregTypeRecipeMap.mRecipeList.add(g);
- }
- }
- return mGregTypeRecipeMap;
+ return GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing;
}
@Override
@@ -255,7 +242,7 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
Logger.INFO("Your Muffler must be AT LEAST ZPM tier or higher.");
}
}
- Logger.INFO("Fission Fuel Production Plant Formed. "+mGregTypeRecipeMap.mRecipeList.size());
+ Logger.INFO("Fission Fuel Production Plant Formed. "+this.getRecipeMap().mRecipeList.size());
this.resetRecipeMapForAllInputHatches(this.getRecipeMap());
return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
index a8a7af9bba..cabadee87a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_GTNH.java
@@ -206,100 +206,7 @@ public class RecipeGen_BlastSmelterGT_GTNH {
}
else {
Logger.MACHINE_INFO("[ABS] Failure. Did not find any EBF recipes to iterate.");
- }
-
- Logger.MACHINE_INFO("[ABS] Generating recipes based on existing Alloy Smelter recipes.");
- //Okay, so now lets Iterate existing EBF recipes.
- if (GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mRecipeList.size() > 0) {
- for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.mRecipeList) {
- if (x == null) {
- continue;
- }
- ItemStack[] inputs, outputs;
- FluidStack[] inputsF;
- int voltage, time, special;
- boolean enabled;
- inputs = x.mInputs;
- outputs = x.mOutputs;
- inputsF = x.mFluidInputs;
- voltage = x.mEUt;
- time = x.mDuration;
- enabled = x.mEnabled;
- special = x.mSpecialValue;
-
- /*Check for GTNH, if it's found, continue to next recipe if the Temp is too high.
- if (CORE.GTNH && special > 3600) {
- Logger.MACHINE_INFO("[ABS] Skipping ABS addition for GTNH due to temp.");
- continue;
- }*/
- FluidStack mMoltenStack = null;
- int mMoltenCount = 0;
- //If We have a valid Output, let's try use our cached data to get it's molten form.
- if (x.mOutputs != null && x.mOutputs[0] != null) {
- mMoltenCount = x.mOutputs[0].stackSize;
- ItemStackData R = new ItemStackData(x.mOutputs[0]);
- Logger.MACHINE_INFO("[ABS] Found "+x.mOutputs[0].getDisplayName()+" as valid AS output, finding it's fluid from the cache. We will require "+(144*mMoltenCount)+"L. Looking for ID "+R.getUniqueDataIdentifier());
- FluidStack tempFluid = getFluidFromIngot(R);
- if (tempFluid != null) {
- //Logger.MACHINE_INFO("[ABS] Got Fluid from Cache.");
- mMoltenStack = FluidUtils.getFluidStack(tempFluid, mMoltenCount*144);
- }
- else {
- Logger.MACHINE_INFO("[ABS] Failed to get Fluid from Cache.");
- }
- }
- //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
- ItemStack[] newInput = new ItemStack[inputs.length+1];
- int l = 1;
- for (ItemStack y : inputs) {
- newInput[l++] = y;
- }
- newInput[0] = CI.getNumberedCircuit(19);
- //Logger.MACHINE_INFO("[ABS] Generating ABS recipe for "+mMoltenStack.getLocalizedName()+".");
- if (CORE.RA.addBlastSmelterRecipe(newInput, (inputsF.length > 0 ? inputsF[0] : null), mMoltenStack, 100, MathUtils.roundToClosestInt(time*0.8), voltage, special)) {
- //Logger.MACHINE_INFO("[ABS] Success.");
- mSuccess++;
- }
- else {
- Logger.MACHINE_INFO("[ABS] AS Recipe Failure.");
- }
- }
- else {
- if (!enabled) {
- Logger.MACHINE_INFO("[ABS] Failure. AS recipe was not enabled.");
- }
- else {
- Logger.MACHINE_INFO("[ABS] Failure. Invalid Inputs or Outputs.");
- if (inputs == null) {
- Logger.MACHINE_INFO("[ABS] Inputs were not Valid.");
- }
- else {
- Logger.MACHINE_INFO("[ABS] inputs size: "+inputs.length);
- }
- if (outputs == null) {
- Logger.MACHINE_INFO("[ABS] Outputs were not Valid.");
- }
- else {
- Logger.MACHINE_INFO("[ABS] outputs size: "+outputs.length);
- }
- if (inputsF == null) {
- Logger.MACHINE_INFO("[ABS] Input Fluids were not Valid.");
- }
- else {
- Logger.MACHINE_INFO("[ABS] inputsF size: "+inputsF.length);
- }
- if (mMoltenStack == null) {
- Logger.MACHINE_INFO("[ABS] Output Fluid were not Valid.");
- }
- }
- }
- }
- }
- else {
- Logger.MACHINE_INFO("[ABS] Failure. Did not find any Alloy Smelter recipes to iterate.");
- }
+ }
Logger.INFO("[ABS] Processed "+mSuccess+" recipes.");
return mSuccess > 0;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 724c42c235..f372baff30 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -552,10 +552,29 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 };
final FluidStack outputs[] = { aOutput1, aOutput2 };
- // Recipe_GT.Gregtech_Recipe_Map.sFissionFuelProcessing.addRecipe(null,
- // inputs, outputs, aDuration, aEUt, 0);
- CustomRecipeMap.sFissionFuelProcessing.addRecipe(null, inputs, outputs, aDuration, aEUt, 0);
- return true;
+
+ GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ true,
+ new ItemStack[] {},
+ new ItemStack[] {},
+ null,
+ new int[] {},
+ inputs,
+ outputs,
+ Math.max(1, aDuration),
+ Math.max(1, aEUt),
+ 0);
+
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
+ int aSize2 = aSize;
+ GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.add(aSpecialRecipe);
+ aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
+
+ if (aSize > aSize2) {
+ Logger.INFO("Added Nuclear Fuel Recipe.");
+ return true;
+ }
+ return false;
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
index 78fc6d7ccc..99e3d5c4d9 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/RecipesToRemove.java
@@ -24,7 +24,7 @@ public class RecipesToRemove {
aRareEarthCentrifuging.mHidden = true;
GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging);
//GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes.mRecipeList.remove(aRareEarthCentrifuging);
- GTPP_Recipe.GT_Recipe_Map_LargeCentrifuge.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging);
+ GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mRecipeList.remove(aRareEarthCentrifuging);
Logger.INFO("Removed vanilla GT Rare Earth processing.");
//Set the Chemical Symbol for Rare Earth now that we are giving it custom outputs
//Best not to set this unless the original recipe is removed.