aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/xmod/gregtech/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/miscutil/xmod/gregtech/api')
-rw-r--r--src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_BasicMachine_Custom_Recipe.java2
-rw-r--r--src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_CustomRecipe_BasicMachine.java12
-rw-r--r--src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe_OLD.java (renamed from src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java)146
3 files changed, 80 insertions, 80 deletions
diff --git a/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_BasicMachine_Custom_Recipe.java b/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_BasicMachine_Custom_Recipe.java
index e051a54fb3..0c501af33a 100644
--- a/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_BasicMachine_Custom_Recipe.java
+++ b/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_BasicMachine_Custom_Recipe.java
@@ -19,7 +19,7 @@ import gregtech.api.util.GT_Utility;
import java.util.Random;
-import miscutil.xmod.gregtech.api.util.GregtechRecipe.Gregtech_Recipe_Map;
+import miscutil.xmod.gregtech.api.util.GregtechRecipe_OLD.Gregtech_Recipe_Map;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
diff --git a/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_CustomRecipe_BasicMachine.java b/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_CustomRecipe_BasicMachine.java
index a3042a4144..c2852c3c1a 100644
--- a/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_CustomRecipe_BasicMachine.java
+++ b/src/Java/miscutil/xmod/gregtech/api/metatileentity/implementations/base/GT_MTE_CustomRecipe_BasicMachine.java
@@ -16,8 +16,8 @@ import gregtech.api.util.GT_Utility;
import java.util.Arrays;
-import miscutil.xmod.gregtech.api.util.GregtechRecipe;
-import miscutil.xmod.gregtech.api.util.GregtechRecipe.Gregtech_Recipe_Map;
+import miscutil.xmod.gregtech.api.util.GregtechRecipe_OLD;
+import miscutil.xmod.gregtech.api.util.GregtechRecipe_OLD.Gregtech_Recipe_Map;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -52,7 +52,7 @@ public abstract class GT_MTE_CustomRecipe_BasicMachine extends GT_MetaTileEntity
/**
* Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered
*/
- protected GregtechRecipe mLastRecipe = null;
+ protected GregtechRecipe_OLD mLastRecipe = null;
private FluidStack mFluidOut;
/**
@@ -514,7 +514,7 @@ public abstract class GT_MTE_CustomRecipe_BasicMachine extends GT_MetaTileEntity
return getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEUt, false);
}
- protected void calculateOverclockedNess(GregtechRecipe tRecipe) {
+ protected void calculateOverclockedNess(GregtechRecipe_OLD tRecipe) {
calculateOverclockedNess(tRecipe.mEUt, tRecipe.mDuration);
}
@@ -546,7 +546,7 @@ public abstract class GT_MTE_CustomRecipe_BasicMachine extends GT_MetaTileEntity
return rOutputs;
}
- protected boolean canOutput(GregtechRecipe tRecipe) {
+ protected boolean canOutput(GregtechRecipe_OLD tRecipe) {
return tRecipe != null && (tRecipe.mNeedsEmptyOutput ? isOutputEmpty() && getDrainableStack() == null : canOutput(tRecipe.getFluidOutput(0)) && canOutput(tRecipe.mOutputs));
}
@@ -723,7 +723,7 @@ public abstract class GT_MTE_CustomRecipe_BasicMachine extends GT_MetaTileEntity
public int checkRecipe() {
Gregtech_Recipe_Map tMap = getRecipeList();
if (tMap == null) return DID_NOT_FIND_RECIPE;
- GregtechRecipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs());
+ GregtechRecipe_OLD tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), getAllInputs());
if (tRecipe == null) return DID_NOT_FIND_RECIPE;
if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
if (!canOutput(tRecipe)) {
diff --git a/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java b/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe_OLD.java
index a44315b2eb..fd91ba40ae 100644
--- a/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe.java
+++ b/src/Java/miscutil/xmod/gregtech/api/util/GregtechRecipe_OLD.java
@@ -38,7 +38,7 @@ import net.minecraftforge.fluids.FluidStack;
* <p/>
* I know this File causes some Errors, because of missing Main Functions, but if you just need to compile Stuff, then remove said erroreous Functions.
*/
-public class GregtechRecipe {
+public class GregtechRecipe_OLD {
public static volatile int VERSION = 508;
/**
@@ -78,7 +78,7 @@ public class GregtechRecipe {
* If this Recipe needs the Output Slots to be completely empty. Needed in case you have randomised Outputs
*/
public boolean mNeedsEmptyOutput = false;
- private GregtechRecipe(GregtechRecipe aRecipe) {
+ private GregtechRecipe_OLD(GregtechRecipe_OLD aRecipe) {
mInputs = GT_Utility.copyStackArray((Object[]) aRecipe.mInputs);
mOutputs = GT_Utility.copyStackArray((Object[]) aRecipe.mOutputs);
mSpecialItems = aRecipe.mSpecialItems;
@@ -94,7 +94,7 @@ public class GregtechRecipe {
mEnabled = aRecipe.mEnabled;
mHidden = aRecipe.mHidden;
}
- protected GregtechRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ protected GregtechRecipe_OLD(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
if (aInputs == null) aInputs = new ItemStack[0];
if (aOutputs == null) aOutputs = new ItemStack[0];
if (aFluidInputs == null) aFluidInputs = new FluidStack[0];
@@ -165,15 +165,15 @@ public class GregtechRecipe {
// checkCellBalance();
- Utils.LOG_SPECIFIC_WARNING(this.getClass().getName()+" | [GregtechRecipe]", "Created new recipe instance for "+UtilsItems.getArrayStackNames(aInputs), 167);
+ Utils.LOG_SPECIFIC_WARNING(this.getClass().getName()+" | [GregtechRecipe_OLD]", "Created new recipe instance for "+UtilsItems.getArrayStackNames(aInputs), 167);
}
- public GregtechRecipe(ItemStack aInput1, ItemStack aOutput1, int aFuelValue, int aType) {
+ public GregtechRecipe_OLD(ItemStack aInput1, ItemStack aOutput1, int aFuelValue, int aType) {
this(aInput1, aOutput1, null, null, null, aFuelValue, aType);
}
// aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000!
- public GregtechRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) {
+ public GregtechRecipe_OLD(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) {
this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue));
Utils.LOG_INFO("Switch case method for adding fuels");
@@ -209,14 +209,14 @@ public class GregtechRecipe {
}
//Custom Recipe Handlers
- public GregtechRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) {
+ public GregtechRecipe_OLD(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) {
this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
if (mInputs.length > 0 && mOutputs[0] != null) {
Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this);
}
}
- /*public GregtechRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) {
+ /*public GregtechRecipe_OLD(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutput, int aDuration, int aEUt) {
this(true, new ItemStack[]{aInput}, aOutput.clone(), null, null, new FluidStack[]{aFluid}, null, aDuration, aEUt, 0);
if (mInputs.length > 0 && mOutputs[0] != null) {
Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(this);
@@ -254,8 +254,8 @@ public class GregtechRecipe {
return mFluidOutputs[aIndex].copy();
}
- public GregtechRecipe copy() {
- return new GregtechRecipe(this);
+ public GregtechRecipe_OLD copy() {
+ return new GregtechRecipe_OLD(this);
}
public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) {
@@ -323,23 +323,23 @@ public class GregtechRecipe {
//public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sCokeOvenRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 2, 1, 0, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sMatterFab2Recipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.matterfab2", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, E, 1, E, true, true);
- //public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true);
- public static final Gregtech_Recipe_Map_Fuel sRocketFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GregtechRecipe>(10), "gt.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true);
- public static final Gregtech_Recipe_Map_Fuel sGeoThermalFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GregtechRecipe>(10), "gt.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
- public static final Gregtech_Recipe_Map sChemicalDehydratorRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 1, 1, 0, 0, 1, E, 1, E, true, true);
+ //public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe_OLD>(200), "gt.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true);
+ public static final Gregtech_Recipe_Map_Fuel sRocketFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GregtechRecipe_OLD>(10), "gt.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true);
+ public static final Gregtech_Recipe_Map_Fuel sGeoThermalFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GregtechRecipe_OLD>(10), "gt.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
+ public static final Gregtech_Recipe_Map sChemicalDehydratorRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe_OLD>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 1, 1, 0, 0, 1, E, 1, E, true, true);
/**
* HashMap of Recipes based on their Items
*/
- public final Map<GT_ItemStack, Collection<GregtechRecipe>> mRecipeItemMap = new HashMap<GT_ItemStack, Collection<GregtechRecipe>>();
+ public final Map<GT_ItemStack, Collection<GregtechRecipe_OLD>> mRecipeItemMap = new HashMap<GT_ItemStack, Collection<GregtechRecipe_OLD>>();
/**
* HashMap of Recipes based on their Fluids
*/
- public final Map<Fluid, Collection<GregtechRecipe>> mRecipeFluidMap = new HashMap<Fluid, Collection<GregtechRecipe>>();
+ public final Map<Fluid, Collection<GregtechRecipe_OLD>> mRecipeFluidMap = new HashMap<Fluid, Collection<GregtechRecipe_OLD>>();
/**
* The List of all Recipes
*/
- public final Collection<GregtechRecipe> mRecipeList;
+ public final Collection<GregtechRecipe_OLD> mRecipeList;
/**
* String used as an unlocalised Name.
*/
@@ -370,7 +370,7 @@ public class GregtechRecipe {
* @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something.
* @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general.
*/
- public Gregtech_Recipe_Map(Collection<GregtechRecipe> aRecipeList,
+ public Gregtech_Recipe_Map(Collection<GregtechRecipe_OLD> aRecipeList,
String aUnlocalizedName, String aLocalName, String aNEIName,
String aNEIGUIPath, int aUsualInputCount,
int aUsualOutputCount, int aMinimalInputItems,
@@ -397,37 +397,37 @@ public class GregtechRecipe {
GT_LanguageManager.addStringLocalization(mUnlocalizedName = aUnlocalizedName, aLocalName);
}
- public GregtechRecipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GregtechRecipe(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ public GregtechRecipe_OLD addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe_OLD(aOptimize, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
- public GregtechRecipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GregtechRecipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false);
+ public GregtechRecipe_OLD addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe_OLD(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false);
}
- public GregtechRecipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GregtechRecipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ public GregtechRecipe_OLD addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe_OLD(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
- public GregtechRecipe addRecipe(boolean aOptimize, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GregtechRecipe(aOptimize, null, null, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ public GregtechRecipe_OLD addRecipe(boolean aOptimize, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe_OLD(aOptimize, null, null, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
- /*public GregtechRecipe addRecipe(boolean aOptimize, FluidStack aInput1, FluidStack aOutput1, ItemStack[] bInput1, ItemStack[] bOutput1, int aDuration, int aEUt, int aSpecialValue) {
- return addRecipe(new GregtechRecipe(aOptimize, aInput1, aOutput1, bInput1,bOutput1, aDuration, aEUt, aSpecialValue));
+ /*public GregtechRecipe_OLD addRecipe(boolean aOptimize, FluidStack aInput1, FluidStack aOutput1, ItemStack[] bInput1, ItemStack[] bOutput1, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe_OLD(aOptimize, aInput1, aOutput1, bInput1,bOutput1, aDuration, aEUt, aSpecialValue));
}*/
- public GregtechRecipe addRecipe(GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD addRecipe(GregtechRecipe_OLD aRecipe) {
Utils.LOG_INFO("Adding Recipe Method 1");
return addRecipe(aRecipe, true, false, false);
}
- protected GregtechRecipe addRecipe(GregtechRecipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
+ protected GregtechRecipe_OLD addRecipe(GregtechRecipe_OLD aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) {
Utils.LOG_INFO("Adding Recipe Method 2 - This Checks if hidden, fake or if duplicate recipes exists, I think.");
aRecipe.mHidden = aHidden;
aRecipe.mFakeRecipe = aFakeRecipe;
- Utils.LOG_INFO("Logging some data about this method: GregtechRecipe["+aRecipe.toString()+"] | aCheckForCollisions["+aCheckForCollisions+"] | aFakeRecipe["+aFakeRecipe+"] | aHidden["+aHidden+"]");
+ Utils.LOG_INFO("Logging some data about this method: GregtechRecipe_OLD["+aRecipe.toString()+"] | aCheckForCollisions["+aCheckForCollisions+"] | aFakeRecipe["+aFakeRecipe+"] | aHidden["+aHidden+"]");
Utils.LOG_INFO("Logging some data about this method: mMinimalInputFluids["+mMinimalInputFluids+"] | mMinimalInputItems["+mMinimalInputItems+"] | aRecipe.mFluidInputs.length["+aRecipe.mFluidInputs.length+"] | aRecipe.mInputs.length["+aRecipe.mInputs.length+"]");
if (aRecipe.mFluidInputs.length < mMinimalInputFluids && aRecipe.mInputs.length < mMinimalInputItems){
Utils.LOG_INFO("Step 2 failed");
@@ -446,41 +446,41 @@ public class GregtechRecipe {
/**
* Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes
*/
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addFakeRecipe(aCheckForCollisions, new GregtechRecipe(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addFakeRecipe(aCheckForCollisions, new GregtechRecipe_OLD(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
/**
* Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes
*/
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
- return addFakeRecipe(aCheckForCollisions, new GregtechRecipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addFakeRecipe(aCheckForCollisions, new GregtechRecipe_OLD(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
/**
* Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes
*/
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, GregtechRecipe_OLD aRecipe) {
return addRecipe(aRecipe, aCheckForCollisions, true, false);
}
- public GregtechRecipe add(GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD add(GregtechRecipe_OLD aRecipe) {
Utils.LOG_INFO("Adding Recipe Method 3");
mRecipeList.add(aRecipe);
for (FluidStack aFluid : aRecipe.mFluidInputs)
if (aFluid != null) {
Utils.LOG_INFO("Fluid is valid - getting some kind of fluid instance to add to the recipe hashmap.");
- Collection<GregtechRecipe> tList = mRecipeFluidMap.get(aFluid.getFluid());
- if (tList == null) mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<GregtechRecipe>(1));
+ Collection<GregtechRecipe_OLD> tList = mRecipeFluidMap.get(aFluid.getFluid());
+ if (tList == null) mRecipeFluidMap.put(aFluid.getFluid(), tList = new HashSet<GregtechRecipe_OLD>(1));
tList.add(aRecipe);
}
return addToItemMap(aRecipe);
}
public void reInit() {
- Map<GT_ItemStack, Collection<GregtechRecipe>> tMap = mRecipeItemMap;
+ Map<GT_ItemStack, Collection<GregtechRecipe_OLD>> tMap = mRecipeItemMap;
if (tMap != null) tMap.clear();
- for (GregtechRecipe tRecipe : mRecipeList) {
+ for (GregtechRecipe_OLD tRecipe : mRecipeList) {
GT_OreDictUnificator.setStackArray(true, tRecipe.mInputs);
GT_OreDictUnificator.setStackArray(true, tRecipe.mOutputs);
if (tMap != null) addToItemMap(tRecipe);
@@ -508,11 +508,11 @@ public class GregtechRecipe {
return aFluid != null && mRecipeFluidMap.containsKey(aFluid);
}
- public GregtechRecipe findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
+ public GregtechRecipe_OLD findRecipe(IHasWorldObjectAndCoords aTileEntity, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
return findRecipe(aTileEntity, null, aNotUnificated, aVoltage, aFluids, null, aInputs);
}
- public GregtechRecipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
+ public GregtechRecipe_OLD findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe_OLD aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack... aInputs) {
return findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, null, aInputs);
}
@@ -528,7 +528,7 @@ public class GregtechRecipe {
* @param aInputs the Item Inputs
* @return the Recipe it has found or null for no matching Recipe
*/
- public GregtechRecipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
+ public GregtechRecipe_OLD findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe_OLD aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
// No Recipes? Well, nothing to be found then.
if (mRecipeList.isEmpty()) return null;
@@ -560,13 +560,13 @@ public class GregtechRecipe {
// Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs)
if (tStack != null) {
- Collection<GregtechRecipe>
+ Collection<GregtechRecipe_OLD>
tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack)));
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
@@ -574,9 +574,9 @@ public class GregtechRecipe {
// If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too.
if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids)
if (aFluid != null) {
- Collection<GregtechRecipe>
+ Collection<GregtechRecipe_OLD>
tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
@@ -585,20 +585,20 @@ public class GregtechRecipe {
return null;
}
- protected GregtechRecipe addToItemMap(GregtechRecipe aRecipe) {
+ protected GregtechRecipe_OLD addToItemMap(GregtechRecipe_OLD aRecipe) {
Utils.LOG_INFO("Adding Recipe Method 4");
for (ItemStack aStack : aRecipe.mInputs)
if (aStack != null) {
Utils.LOG_INFO("Method 4 - Manipulating "+aStack.getDisplayName());
GT_ItemStack tStack = new GT_ItemStack(aStack);
Utils.LOG_INFO("Method 4 - Made gt stack of item "+tStack.toStack().getDisplayName());
- Collection<GregtechRecipe> tList = mRecipeItemMap.get(tStack);
+ Collection<GregtechRecipe_OLD> tList = mRecipeItemMap.get(tStack);
if (tList != null){
Utils.LOG_INFO("Method 4 - Gt Recipe Hashmap: "+tList.toString());
}
if (tList == null){
Utils.LOG_INFO("Method 4 - brrr list was NUll");
- mRecipeItemMap.put(tStack, tList = new HashSet<GregtechRecipe>(1));
+ mRecipeItemMap.put(tStack, tList = new HashSet<GregtechRecipe_OLD>(1));
Utils.LOG_INFO("Method 4 - Attemping backup method for Gt Recipe Hashmap:");
while (tList.iterator().hasNext()){
@@ -612,7 +612,7 @@ public class GregtechRecipe {
return aRecipe;
}
- public GregtechRecipe findRecipe(IGregTechTileEntity baseMetaTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated,
+ public GregtechRecipe_OLD findRecipe(IGregTechTileEntity baseMetaTileEntity, GregtechRecipe_OLD aRecipe, boolean aNotUnificated,
long aVoltage, FluidStack[] aFluids, FluidStack[] fluidStacks) {
ItemStack aInputs[] = null;
@@ -647,13 +647,13 @@ public class GregtechRecipe {
// Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs)
if (tStack != null) {
- Collection<GregtechRecipe>
+ Collection<GregtechRecipe_OLD>
tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack)));
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
@@ -661,9 +661,9 @@ public class GregtechRecipe {
// If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too.
if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids)
if (aFluid != null) {
- Collection<GregtechRecipe>
+ Collection<GregtechRecipe_OLD>
tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
- if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (tRecipes != null) for (GregtechRecipe_OLD tRecipe : tRecipes)
if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
}
@@ -681,7 +681,7 @@ public class GregtechRecipe {
* Abstract Class for general Recipe Handling of non GT Recipes
*/
public static abstract class GT_Recipe_Map_NonGTRecipes extends Gregtech_Recipe_Map {
- public GT_Recipe_Map_NonGTRecipes(Collection<GregtechRecipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
+ public GT_Recipe_Map_NonGTRecipes(Collection<GregtechRecipe_OLD> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
}
@@ -701,37 +701,37 @@ public class GregtechRecipe {
}
@Override
- public GregtechRecipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ public GregtechRecipe_OLD addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
return null;
}
@Override
- public GregtechRecipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ public GregtechRecipe_OLD addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
return null;
}
@Override
- public GregtechRecipe addRecipe(GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD addRecipe(GregtechRecipe_OLD aRecipe) {
return null;
}
@Override
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
return null;
}
@Override
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
return null;
}
@Override
- public GregtechRecipe addFakeRecipe(boolean aCheckForCollisions, GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD addFakeRecipe(boolean aCheckForCollisions, GregtechRecipe_OLD aRecipe) {
return null;
}
@Override
- public GregtechRecipe add(GregtechRecipe aRecipe) {
+ public GregtechRecipe_OLD add(GregtechRecipe_OLD aRecipe) {
return null;
}
@@ -739,7 +739,7 @@ public class GregtechRecipe {
public void reInit() {/**/}
@Override
- protected GregtechRecipe addToItemMap(GregtechRecipe aRecipe) {
+ protected GregtechRecipe_OLD addToItemMap(GregtechRecipe_OLD aRecipe) {
return null;
}
}
@@ -748,31 +748,31 @@ public class GregtechRecipe {
* Just a Recipe Map with Utility specifically for Fuels.
*/
public static class Gregtech_Recipe_Map_Fuel extends Gregtech_Recipe_Map {
- public Gregtech_Recipe_Map_Fuel(Collection<GregtechRecipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
+ public Gregtech_Recipe_Map_Fuel(Collection<GregtechRecipe_OLD> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
}
- public GregtechRecipe addFuel(ItemStack aInput, ItemStack aOutput, int aFuelValueInEU) {
+ public GregtechRecipe_OLD addFuel(ItemStack aInput, ItemStack aOutput, int aFuelValueInEU) {
Utils.LOG_INFO("Adding Fuel using method 1");
return addFuel(aInput, aOutput, null, null, 10000, aFuelValueInEU);
}
- public GregtechRecipe addFuel(ItemStack aInput, ItemStack aOutput, int aChance, int aFuelValueInEU) {
+ public GregtechRecipe_OLD addFuel(ItemStack aInput, ItemStack aOutput, int aChance, int aFuelValueInEU) {
Utils.LOG_INFO("Adding Fuel using method 2");
return addFuel(aInput, aOutput, null, null, aChance, aFuelValueInEU);
}
- public GregtechRecipe addFuel(FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
+ public GregtechRecipe_OLD addFuel(FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
Utils.LOG_INFO("Adding Fuel using method 3");
return addFuel(null, null, aFluidInput, aFluidOutput, 10000, aFuelValueInEU);
}
- public GregtechRecipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
+ public GregtechRecipe_OLD addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aFuelValueInEU) {
Utils.LOG_INFO("Adding Fuel using method 4");
return addFuel(aInput, aOutput, aFluidInput, aFluidOutput, 10000, aFuelValueInEU);
}
- public GregtechRecipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aChance, int aFuelValueInEU) {
+ public GregtechRecipe_OLD addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aChance, int aFuelValueInEU) {
Utils.LOG_INFO("Adding Fuel using method 5");
return addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, 0, 0, aFuelValueInEU);
}