aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/gregtech/api
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-05-15 13:07:19 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-05-15 13:07:19 +1000
commit83abafec38764fd6f562ce5320fc446ddaad6ff6 (patch)
tree742e274310177bfc56ad7f76145b2227a50bfa66 /src/Java/miscutil/gregtech/api
parent6d4c465858fe1a199628de86edff1152f97faa52 (diff)
downloadGT5-Unofficial-83abafec38764fd6f562ce5320fc446ddaad6ff6.tar.gz
GT5-Unofficial-83abafec38764fd6f562ce5320fc446ddaad6ff6.tar.bz2
GT5-Unofficial-83abafec38764fd6f562ce5320fc446ddaad6ff6.zip
Should be loading recipes, but getting nullpoints on #20 of RECIPES_GREGTECH.java
Diffstat (limited to 'src/Java/miscutil/gregtech/api')
-rw-r--r--src/Java/miscutil/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java14
-rw-r--r--src/Java/miscutil/gregtech/api/util/GregtechRecipe.java81
2 files changed, 9 insertions, 86 deletions
diff --git a/src/Java/miscutil/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/miscutil/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 049611149e..8aa77d75ba 100644
--- a/src/Java/miscutil/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/miscutil/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -5,18 +5,18 @@ import net.minecraftforge.fluids.FluidStack;
public interface IGregtech_RecipeAdder {
/**
- * Adds a FusionreactorRecipe
+ * Adds a Coke Oven Recipe
*
- * @param aOptimize = EU needed for heating up (must be >= 0)
- * @param aInput1 = first Input (can be null, and respects StackSize)
+ * @param aInput1 = first Input (not null, and respects StackSize)
+ * @param aInputb = second Input (can be null, and respects StackSize)
* @param aOutput1 = Output of the Creosote (not null, and respects StackSize)
- * @param bInput1 = first solid Input (not null, and respects StackSize)
- * @param bOutput1 = Output of the Coal/coke (can be null, and respects StackSize)
+ * @param aFluidInput = fluid Input (can be null, and respects StackSize)
+ * @param aOutput = Output of the Coal/coke (can be null, and respects StackSize)
* @param aDuration = Duration (must be >= 0)
* @param aEUt = EU needed for heating up (must be >= 0)
- * @param aSpecialValue = EU needed for heating up (must be >= 0)
* @return true if the Recipe got added, otherwise false.
*/
- public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue);
+ //public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue);
+ public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt);
}
diff --git a/src/Java/miscutil/gregtech/api/util/GregtechRecipe.java b/src/Java/miscutil/gregtech/api/util/GregtechRecipe.java
index 4fe870a830..56b573f5ae 100644
--- a/src/Java/miscutil/gregtech/api/util/GregtechRecipe.java
+++ b/src/Java/miscutil/gregtech/api/util/GregtechRecipe.java
@@ -1,6 +1,5 @@
package miscutil.gregtech.api.util;
-import static gregtech.api.enums.GT_Values.D1;
import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import static gregtech.api.enums.GT_Values.W;
@@ -10,7 +9,6 @@ import gregtech.api.objects.GT_FluidStack;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
@@ -258,7 +256,7 @@ public class GregtechRecipe {
*/
public static final Collection<Gregtech_Recipe_Map> sMappings = new ArrayList<Gregtech_Recipe_Map>();
//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), "mu.recipe.cokeoven", "Coke Oven", 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/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true);
//public static final Gregtech_Recipe_Map sCokeOvenRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "mu.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/E_Furnace", 1, 1, 1, 1, 1, E, 1, E, true, true);
@@ -604,79 +602,4 @@ public class GregtechRecipe {
return null;
}
}
-
- /**
- * Special Class for Furnace Recipe handling.
- */
- public static class GT_Recipe_Map_Furnace extends GT_Recipe_Map_NonGTRecipes {
- public GT_Recipe_Map_Furnace(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) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GregtechRecipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null;
- if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe;
-
- try {
- ItemStack tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.cokeOven.getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getOutput();
- if (tRecipeOutputs != null) {
- //aRecipe = new GregtechRecipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs(new ItemStack[tRecipeOutputs.size()]), null, null, null, null, 800, 2, 0);
- aRecipe.mCanBeBuffered = false;
- aRecipe.mNeedsEmptyOutput = true;
- return aRecipe;
- }
- } catch (NoClassDefFoundError e) {
- if (D1) GT_Log.err.println("Railcraft Not loaded");
- } catch (NullPointerException e) {/**/}
-
-
- ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], false, null);
- return tOutput == null ? null : new GregtechRecipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[]{tOutput}, null, null, null, null, 128, 4, 0);
- }
-
- @Override
- public boolean containsInput(ItemStack aStack) {
- return GT_ModHandler.getSmeltingOutput(aStack, false, null) != null;
- }
- }
-}
-
-
-/**
- * Special Class for Macerator/RockCrusher Recipe handling.
- */
-/*public static class GT_Recipe_Map_Macerator extends GT_Recipe_Map {
- public GT_Recipe_Map_Macerator(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) {
- super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
- }
-
- @Override
- public GregtechRecipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) {
- if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || !GregTech_API.sPostloadFinished)
- return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- aRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs);
- if (aRecipe != null) return aRecipe;
-
- try {
- ItemStack tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.cokeOven.getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getOutput();
- if (tRecipeOutputs != null) {
- aRecipe = new GregtechRecipe(false, new ItemStack[]{GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs(new ItemStack[tRecipeOutputs.size()]), null, null, null, null, 800, 2, 0);
- aRecipe.mCanBeBuffered = false;
- aRecipe.mNeedsEmptyOutput = true;
- return aRecipe;
- }
- } catch (NoClassDefFoundError e) {
- if (D1) GT_Log.err.println("Railcraft Not loaded");
- } catch (NullPointerException e) {}
-
- ItemStack tComparedInput = GT_Utility.copy(aInputs[0]);
- ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.macerator.getRecipes(), true, new NBTTagCompound(), null, null, null);
- return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GregtechRecipe(false, new ItemStack[]{GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null;
- }
-
- @Override
- public boolean containsInput(ItemStack aStack) {
- return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), false, new NBTTagCompound(), null, null, null));
- }
-}*/
+} \ No newline at end of file