aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GT_RecipeAdder.java
diff options
context:
space:
mode:
authorGlodBlock <60341015+GlodBlock@users.noreply.github.com>2021-09-27 15:39:31 +0800
committerGitHub <noreply@github.com>2021-09-27 15:39:31 +0800
commit097438be70486735a8940dd5ce4e9484b6d951af (patch)
tree90f26b34d5059eb9858d9c82aabbd5373638acfa /src/main/java/gregtech/common/GT_RecipeAdder.java
parenta0a77f0b9868a4ca8a3df8ae8d50b4dcfb4030db (diff)
parent92433a5b85bb2fcca541ac25ca4033fac24f841e (diff)
downloadGT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.tar.gz
GT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.tar.bz2
GT5-Unofficial-097438be70486735a8940dd5ce4e9484b6d951af.zip
Merge pull request #1 from GlodBlock/fix-crack-recipe-check
Fix crack recipe check
Diffstat (limited to 'src/main/java/gregtech/common/GT_RecipeAdder.java')
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java295
1 files changed, 183 insertions, 112 deletions
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 96c1374059..cdf3bf38b7 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -33,6 +33,7 @@ import static gregtech.GT_Mod.GT_FML_LOGGER;
public class GT_RecipeAdder implements IGT_RecipeAdder {
+ @Override
@Deprecated
public boolean addFusionReactorRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, int aStartEU) {
return false;
@@ -50,18 +51,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration) {
return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, 5);
}
+ @Override
public boolean addCentrifugeRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) {
return addCentrifugeRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt);
}
+ @Override
public boolean addCentrifugeRecipe(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) {
return addCentrifugeRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, aChances, aDuration, aEUt, false);
}
+ @Override
public boolean addCentrifugeRecipe(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, boolean aCleanroom) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
return false;
@@ -72,13 +77,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aFluidInput.getFluid().getName(), aDuration)) <= 0)) {
return false;
}
- if (!GT_Mod.gregtechproxy.mEnableCleanroom){
+ if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
aCleanroom = false;
}
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, }, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, aCleanroom ? -100 : 0);
+ GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6,}, null, aChances, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, aCleanroom ? -100 : 0);
return true;
}
+ @Override
public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -90,10 +96,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addElectrolyzerRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, ItemStack aOutput5, ItemStack aOutput6, int aDuration, int aEUt) {
return addElectrolyzerRecipe(aInput1, aInput2 < 0 ? ItemList.IC2_Fuel_Can_Empty.get(-aInput2, new Object[0]) : aInput2 > 0 ? ItemList.Cell_Empty.get(aInput2, new Object[0]) : null, null, null, aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6, null, aDuration, aEUt);
}
+ @Override
public boolean addElectrolyzerRecipe(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) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
return false;
@@ -108,28 +116,37 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration) {
return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration);
}
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int aDuration, int aEUt) {
return addChemicalRecipe(aInput1, aInput2, null, null, aOutput, aDuration, aEUt);
}
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration) {
return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30);
}
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration) {
return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, 30);
}
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUTick) {
return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, GT_Values.NI, aDuration, aEUTick);
}
+
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) {
return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aOutput2, aDuration, aEUtick, false);
}
+
+ @Override
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick, boolean aCleanroom) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) {
return false;
@@ -143,7 +160,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (aEUtick <= 0) {
return false;
}
- if (!GT_Mod.gregtechproxy.mEnableCleanroom){
+ if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
aCleanroom = false;
}
GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput, aOutput2}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, aCleanroom ? -200 : 0);
@@ -154,7 +171,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
- public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick){
+ @Override
+ public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick) {
if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) {
return false;
}
@@ -165,6 +183,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addChemicalRecipeForBasicMachineOnly(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, ItemStack aOutput2, int aDuration, int aEUtick) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) {
return false;
@@ -183,25 +202,27 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
@Override
- public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer){
- //Oxygen/Titaniumtetrafluoride -> +50% Output each
- addChemicalRecipe(ItemList.Cell_Air.get(1, new Object[0]), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 144), Materials.Empty.getCells(1), 160);
- addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 216), Materials.Empty.getCells(1), 160);
- addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Air.getGas(14000), new GT_FluidStack(aPolymer, 1000), Materials.Empty.getCells(1), 1120);
- addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(7000), new GT_FluidStack(aPolymer, 1500), Materials.Empty.getCells(1), 1120);
- addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)},
- new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)},
- new FluidStack[]{new GT_FluidStack(aPolymer, 3240)}, null, 800, 30);
- addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)},
- new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)},
- new FluidStack[]{new GT_FluidStack(aPolymer, 4320)}, null, 800, 30);
+ public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, ItemStack aBasicMaterialCell, Fluid aPolymer) {
+ //Oxygen/Titaniumtetrafluoride -> +50% Output each
+ addChemicalRecipe(ItemList.Cell_Air.get(1, new Object[0]), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 144), Materials.Empty.getCells(1), 160);
+ addChemicalRecipe(Materials.Oxygen.getCells(1), GT_Utility.getIntegratedCircuit(1), new GT_FluidStack(aBasicMaterial, 144), new GT_FluidStack(aPolymer, 216), Materials.Empty.getCells(1), 160);
+ addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Air.getGas(14000), new GT_FluidStack(aPolymer, 1000), Materials.Empty.getCells(1), 1120);
+ addChemicalRecipe(aBasicMaterialCell, GT_Utility.getIntegratedCircuit(1), Materials.Oxygen.getGas(7000), new GT_FluidStack(aPolymer, 1500), Materials.Empty.getCells(1), 1120);
+ addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)},
+ new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Air.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)},
+ new FluidStack[]{new GT_FluidStack(aPolymer, 3240)}, null, 800, 30);
+ addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(2)},
+ new FluidStack[]{new GT_FluidStack(aBasicMaterial, 2160), Materials.Oxygen.getGas(7500), Materials.Titaniumtetrachloride.getFluid(100)},
+ new FluidStack[]{new GT_FluidStack(aPolymer, 4320)}, null, 800, 30);
}
+ @Override
public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) {
return addBlastRecipe(aInput1, aInput2, null, null, aOutput1, aOutput2, aDuration, aEUt, aLevel);
}
+ @Override
public boolean addBlastRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -214,6 +235,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addPrimitiveBlastRecipe(ItemStack aInput1, ItemStack aInput2, int aCoalAmount, ItemStack aOutput1, ItemStack aOutput2, int aDuration) {
if ((aInput1 == null && aInput2 == null) || (aOutput1 == null && aOutput2 == null)) {
return false;
@@ -226,29 +248,30 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
Materials[] coals = new Materials[]{Materials.Coal, Materials.Charcoal};
for (Materials coal : coals) {
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getGems(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0);
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getDust(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0);
- }
- if (Loader.isModLoaded("Railcraft")) {
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0);
- }
- if ((aInput1 == null || aInput1.stackSize <= 6 ) && (aInput2 == null || aInput2.stackSize <= 6 ) &&
- (aOutput1 == null || aOutput1.stackSize <= 6 ) && (aOutput2 == null || aOutput2.stackSize <= 6 )) {
- aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10, aInput1);
- aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10, aInput2);
- aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10, aOutput1);
- aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10, aOutput2);
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getGems(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0);
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getDust(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDustTiny(aCoalAmount)}, null, null, null, null, aDuration, 0, 0);
+ }
+ if (Loader.isModLoaded("Railcraft")) {
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, RailcraftToolItems.getCoalCoke(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDustTiny(aCoalAmount / 2)}, null, null, null, null, aDuration * 2 / 3, 0, 0);
+ }
+ if ((aInput1 == null || aInput1.stackSize <= 6) && (aInput2 == null || aInput2.stackSize <= 6) &&
+ (aOutput1 == null || aOutput1.stackSize <= 6) && (aOutput2 == null || aOutput2.stackSize <= 6)) {
+ aInput1 = aInput1 == null ? null : GT_Utility.copyAmount(aInput1.stackSize * 10, aInput1);
+ aInput2 = aInput2 == null ? null : GT_Utility.copyAmount(aInput2.stackSize * 10, aInput2);
+ aOutput1 = aOutput1 == null ? null : GT_Utility.copyAmount(aOutput1.stackSize * 10, aOutput1);
+ aOutput2 = aOutput2 == null ? null : GT_Utility.copyAmount(aOutput2.stackSize * 10, aOutput2);
for (Materials coal : coals) {
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0);
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0);
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0);
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, coal.getBlocks(aCoalAmount)}, new ItemStack[]{aOutput1, aOutput2, Materials.DarkAsh.getDust(aCoalAmount)}, null, null, null, null, aDuration * 10, 0, 0);
}
- if (Loader.isModLoaded("Railcraft")) {
- GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2)}, null, null, null, null, aDuration * 20 / 3, 0, 0);
+ if (Loader.isModLoaded("Railcraft")) {
+ GT_Recipe.GT_Recipe_Map.sPrimitiveBlastRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2, EnumCube.COKE_BLOCK.getItem(aCoalAmount / 2)}, new ItemStack[]{aOutput1, aOutput2, Materials.Ash.getDust(aCoalAmount / 2)}, null, null, null, null, aDuration * 20 / 3, 0, 0);
}
}
return true;
}
+ @Override
public boolean addCannerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -265,6 +288,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false);
}
+ @Override
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean hidden) {
if ((aInput1 == null) || (aOutput1 == null || Materials.Graphite.contains(aInput1))) {
return false;
@@ -275,13 +299,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration)) <= 0) {
return false;
}
- GT_Recipe tRecipe =new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1);
+ GT_Recipe tRecipe = new GT_Recipe(aInput1, aInput2, aEUt, aDuration, aOutput1);
if ((hidden) && (tRecipe != null)) {
tRecipe.mHidden = true;
}
return true;
}
+ @Override
@Deprecated
public boolean addCNCRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
@@ -293,6 +318,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addLatheRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -303,6 +329,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
new GT_Recipe(aInput1, aOutput1, aOutput2, aDuration, aEUt);
return true;
}
+
@Override
public boolean addCutterRecipe(ItemStack aInput, FluidStack aLubricant, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) {
@@ -315,32 +342,39 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) {
- return addCutterRecipe(aInput,null,aOutput1,aOutput2,aDuration,aEUt,aCleanroom);
+ return addCutterRecipe(aInput, null, aOutput1, aOutput2, aDuration, aEUt, aCleanroom);
}
- public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt){
- return addCutterRecipe(aInput,aCircuit,aOutput1,aOutput2,aDuration,aEUt,false);
+
+ public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
+ return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false);
}
+
public boolean addCutterRecipe(ItemStack aInput, int aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) {
- return addCutterRecipe(aInput,GT_Utility.getIntegratedCircuit(aCircuit),aOutput1,aOutput2,aDuration,aEUt,aCleanroom);
+ return addCutterRecipe(aInput, GT_Utility.getIntegratedCircuit(aCircuit), aOutput1, aOutput2, aDuration, aEUt, aCleanroom);
}
+ @Override
public boolean addCutterRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
- return addCutterRecipe(aInput, aOutput1, aOutput2, aDuration, aEUt,false);
+ return addCutterRecipe(aInput, aOutput1, aOutput2, aDuration, aEUt, false);
}
+ @Override
public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) {
- return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt,false);
+ return addCutterRecipe(aInput, aCircuit, aOutput1, aOutput2, aDuration, aEUt, false);
}
+ @Override
public boolean addCutterRecipe(ItemStack aInput, ItemStack aCircuit, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, boolean aCleanroom) {
- return addCutterRecipe(new ItemStack[]{aInput,aCircuit},new ItemStack[]{aOutput1,aOutput2},aDuration,aEUt,aCleanroom ? -200 : 0);
+ return addCutterRecipe(new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput1, aOutput2}, aDuration, aEUt, aCleanroom ? -200 : 0);
}
public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, boolean aCleanroom) {
return addCutterRecipe(aInputs, aOutputs, aDuration, aEUt, aCleanroom ? -200 : 0);
}
+ @Override
public boolean addCutterRecipe(ItemStack[] aInputs, ItemStack[] aOutputs, int aDuration, int aEUt, int aSpecial) {
if ((aInputs == null) || (aOutputs == null) || aInputs.length == 0 || aOutputs.length == 0) {
return false;
@@ -348,7 +382,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInputs[0], aDuration)) <= 0) {
return false;
}
- if (!GT_Mod.gregtechproxy.mEnableCleanroom && aSpecial == -200){
+ if (!GT_Mod.gregtechproxy.mEnableCleanroom && aSpecial == -200) {
aSpecial = 0;
}
GT_Recipe.GT_Recipe_Map.sCutterRecipes.addRecipe(true, aInputs, aOutputs, null, new FluidStack[]{Materials.Water.getFluid(Math.max(4, Math.min(1000, aDuration * aEUt / 320)))}, null, aDuration * 2, aEUt, aSpecial);
@@ -358,17 +392,19 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
- public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict,int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt){
- for(ItemStack tStack : GT_OreDictUnificator.getOres(aOreDict)){
- if(GT_Utility.isStackValid(tStack))
+ @Override
+ public boolean addAssemblerRecipe(ItemStack aInput1, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
+ for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) {
+ if (GT_Utility.isStackValid(tStack))
addAssemblerRecipe(aInput1, GT_Utility.copyAmount(aAmount, tStack), aFluidInput, aOutput1, aDuration, aEUt);
}
return true;
}
- public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt){
- for(ItemStack tStack : GT_OreDictUnificator.getOres(aOreDict)){
- if(GT_Utility.isStackValid(tStack)) {
+ @Override
+ public boolean addAssemblerRecipe(ItemStack[] aInputs, Object aOreDict, int aAmount, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
+ for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(aOreDict)) {
+ if (GT_Utility.isStackValid(tStack)) {
ItemStack[] extendedInputs = new ItemStack[aInputs.length + 1];
System.arraycopy(aInputs, 0, extendedInputs, 0, aInputs.length);
extendedInputs[aInputs.length] = GT_Utility.copyAmount(aAmount, tStack);
@@ -378,44 +414,29 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) {
- /*if ((aInput1 == null) || (aOutput1 == null)) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0);
- return true;
- */
- return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, null,aOutput1, aDuration, aEUt, false);
+ return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2 == null ? aInput1 : aInput2}, null, aOutput1, aDuration, aEUt, false);
}
+ @Override
public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt);
}
+ @Override
public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt) {
- /*if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) {
- return false;
- }
- if (aOutput1 == null) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, 0);
- */
return addAssemblerRecipe(aInputs, aFluidInput, aOutput1, aDuration, aEUt, false);
}
+ @Override
public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) {
- if(aInput2==null)
- return addAssemblerRecipe(new ItemStack[]{aInput1},aFluidInput,aOutput1,aDuration,aEUt,aCleanroom);
- return addAssemblerRecipe(new ItemStack[]{aInput1,aInput2},aFluidInput,aOutput1,aDuration,aEUt,aCleanroom);
+ if (aInput2 == null)
+ return addAssemblerRecipe(new ItemStack[]{aInput1}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom);
+ return addAssemblerRecipe(new ItemStack[]{aInput1, aInput2}, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom);
}
+ @Override
public boolean addAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) {
if (areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) {
@@ -426,7 +447,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
- if (!GT_Mod.gregtechproxy.mEnableCleanroom){
+ if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
aCleanroom = false;
}
@@ -437,7 +458,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
boolean ret = false;
for (int oreID : OreDictionary.getOreIDs(aOutput1)) {
- if (OreDictionary.getOreName(oreID).contains("circuit")){
+ if (OreDictionary.getOreName(oreID).startsWith("circuit")) {
return this.addAssemblerRecipeNonOD(aInputs, aFluidInput, aOutput1, aDuration, aEUt, aCleanroom);
}
}
@@ -449,11 +470,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
for (int oreID : OreDictionary.getOreIDs(aInputs[i])) {
String odName = OreDictionary.getOreName(oreID);
- if (odName.contains("circuit")) {
- for (ItemStack tStack : GT_OreDictUnificator.getOres(odName)) {
+ if (odName.startsWith("circuit")) {
+ for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(odName)) {
if (!GT_Utility.isStackValid(tStack))
continue;
- aInputs[i] = new ItemStack(tStack.getItem(),aInputs[i].stackSize,tStack.getItemDamage());
+ aInputs[i] = new ItemStack(tStack.getItem(), aInputs[i].stackSize, tStack.getItemDamage());
GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[]{aOutput1}, null, new FluidStack[]{aFluidInput}, null, aDuration, aEUt, aCleanroom ? -200 : 0);
ret = true;
}
@@ -478,7 +499,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
- if (!GT_Mod.gregtechproxy.mEnableCleanroom){
+ if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
aCleanroom = false;
}
@@ -491,7 +512,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
- public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
+ @Override
+ public boolean addWiremillRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput == null)) {
return false;
}
@@ -502,6 +524,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addPolarizerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -513,6 +536,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addBenderRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -524,6 +548,20 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
+ public boolean addBenderRecipe(ItemStack aInput1, ItemStack aCircuit, ItemStack aOutput1, int aDuration, int aEUt) {
+ if ((aInput1 == null) || (aOutput1 == null)) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("bender", aInput1, aDuration)) <= 0) {
+ return false;
+ }
+ GT_Recipe tRecipe = new GT_Recipe(new ItemStack[]{aInput1, aCircuit}, new ItemStack[]{aOutput1}, null, null, null, null, aDuration, Math.max(aEUt, 1), 0);
+ GT_Recipe.GT_Recipe_Map.sBenderRecipes.addRecipe(tRecipe);
+ return true;
+ }
+
+ @Override
public boolean addExtruderRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aShape == null) || (aOutput == null)) {
return false;
@@ -535,6 +573,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addSlicerRecipe(ItemStack aInput, ItemStack aShape, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aShape == null) || (aOutput == null)) {
return false;
@@ -546,6 +585,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addOreWasherRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, FluidStack aFluidInput, int aDuration, int aEUt) {
if ((aInput == null) || (aFluidInput == null) || ((aOutput1 == null) || (aOutput2 == null) || (aOutput3 == null))) {
return false;
@@ -557,6 +597,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addImplosionRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -582,16 +623,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
@Deprecated
public boolean addDistillationRecipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) {
-// if ((aInput1 == null) || (aOutput1 == null)) {
-// return false;
-// }
-// if ((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput1, aDuration)) <= 0) {
-// return false;
-// }
-// new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2, aOutput3, aOutput4, aDuration, aEUt);
-// return true;
return false;
}
@@ -605,6 +639,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addDistillationTowerRecipe(aInput, aOutputs, aOutput2, aDuration, aEUt);
}
+ @Override
public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) {
if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 11) {
return false;
@@ -616,6 +651,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
+ @Override
public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -627,6 +663,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addVacuumFreezerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -638,11 +675,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
@Deprecated
public boolean addGrinderRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4) {
return false;
}
+ @Override
public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType) {
if (aInput1 == null) {
return false;
@@ -651,6 +690,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addSonictronSound(ItemStack aItemStack, String aSoundName) {
if ((aItemStack == null) || (aSoundName == null) || (aSoundName.equals(""))) {
return false;
@@ -665,6 +705,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addForgeHammerRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -676,6 +717,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addBoxingRecipe(ItemStack aContainedItem, ItemStack aEmptyBox, ItemStack aFullBox, int aDuration, int aEUt) {
if ((aContainedItem == null) || (aFullBox == null)) {
return false;
@@ -687,6 +729,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addUnboxingRecipe(ItemStack aFullBox, ItemStack aContainedItem, ItemStack aEmptyBox, int aDuration, int aEUt) {
if ((aFullBox == null) || (aContainedItem == null)) {
return false;
@@ -698,6 +741,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addThermalCentrifugeRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput1 == null)) {
return false;
@@ -709,6 +753,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addAmplifier(ItemStack aAmplifierItem, int aDuration, int aAmplifierAmountOutputted) {
if ((aAmplifierItem == null) || (aAmplifierAmountOutputted <= 0)) {
return false;
@@ -720,6 +765,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, int aDuration, int aEUt, boolean aHidden) {
if ((aIngredient == null) || (aInput == null) || (aOutput == null)) {
return false;
@@ -734,10 +780,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addBrewingRecipe(ItemStack aIngredient, Fluid aInput, Fluid aOutput, boolean aHidden) {
return addBrewingRecipe(aIngredient, aInput, aOutput, 128, 4, aHidden);
}
+ @Override
public boolean addBrewingRecipeCustom(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -752,6 +800,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -766,10 +815,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFermentingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, boolean aHidden) {
return addFermentingRecipe(aInput, aOutput, aDuration, 2, aHidden);
}
+ @Override
public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -815,18 +866,22 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) {
return addDistilleryRecipe(aCircuit, aInput, aOutput, null, aDuration, aEUt, aHidden);
}
+ @Override
public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) {
return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aSolidOutput, aDuration, aEUt, aHidden);
}
+ @Override
public boolean addDistilleryRecipe(int circuitConfig, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt, boolean aHidden) {
return addDistilleryRecipe(GT_Utility.getIntegratedCircuit(circuitConfig), aInput, aOutput, aDuration, aEUt, aHidden);
}
+ @Override
public boolean addFluidSolidifierRecipe(ItemStack aMold, FluidStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
if ((aMold == null) || (aInput == null) || (aOutput == null)) {
return false;
@@ -849,6 +904,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addFluidSmelterRecipe(aInput, aRemains, aOutput, aChance, aDuration, aEUt, false);
}
+ @Override
public boolean addFluidSmelterRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt, boolean hidden) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -869,6 +925,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFluidExtractionRecipe(ItemStack aInput, ItemStack aRemains, FluidStack aOutput, int aChance, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -886,13 +943,11 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput) {
int aDuration= aFluidOutput == null ? aFluidInput.amount / 62 : aFluidOutput.amount / 62;
- if ((aInput != null) && (aOutput != null)) {
- if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) {
- }
- } else {
+ if (aInput == null || aOutput == null) {
return false;
}
if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) {
@@ -905,11 +960,9 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFluidCannerRecipe(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt) {
- if ((aInput != null) && (aOutput != null)) {
- if ((aFluidInput == null ? 1 : 0) != (aFluidOutput == null ? 1 : 0)) {
- }
- } else {
+ if (aInput == null || aOutput == null) {
return false;
}
if (!GregTech_API.sRecipeFile.get("fluidcanner", aOutput, true)) {
@@ -922,6 +975,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addChemicalBathRecipe(ItemStack aInput, FluidStack aBathingFluid, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) {
if ((aInput == null) || (aBathingFluid == null) || (aOutput1 == null)) {
return false;
@@ -933,6 +987,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addElectromagneticSeparatorRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, int[] aChances, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput1 == null)) {
return false;
@@ -944,6 +999,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addExtractorRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -955,6 +1011,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addPrinterRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aSpecialSlot, ItemStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
return false;
@@ -966,10 +1023,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
return addAutoclaveRecipe(aInput, aFluid, aOutput,aChance, aDuration, aEUt);
}
+ @Override
public boolean addAutoclaveRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt) {
return addAutoclaveRecipe(aInput, null, aFluid, aOutput, aChance, aDuration, aEUt, false);
}
@@ -978,8 +1037,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addAutoclaveRecipe(aInput, aCircuit, aFluid, aOutput, aChance, aDuration, aEUt, false);
}
- public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
- if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
+ @Override
+ public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
+ return addAutoclaveRecipe(aInput, aCircuit, aFluidIn, null, aOutput, aChance, aDuration, aEUt,aCleanroom);
+ }
+
+ @Override
+ public boolean addAutoclaveRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluidIn, FluidStack aFluidOut, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
+ if ((aInput == null) || (aFluidIn == null) || (aOutput == null)) {
return false;
}
if ((aDuration = GregTech_API.sRecipeFile.get("autoclave", aInput, aDuration)) <= 0) {
@@ -988,14 +1053,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (!GT_Mod.gregtechproxy.mEnableCleanroom){
aCleanroom = false;
}
- GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluid}, null, aDuration, aEUt, aCleanroom ? -200 : 0);
+ GT_Recipe.GT_Recipe_Map.sAutoclaveRecipes.addRecipe(true, new ItemStack[]{aInput, aCircuit}, new ItemStack[]{aOutput}, null, new int[]{aChance}, new FluidStack[]{aFluidIn}, new FluidStack[]{aFluidOut}, aDuration, aEUt, aCleanroom ? -200 : 0);
return true;
}
+ @Override
public boolean addAutoclaveSpaceRecipe(ItemStack aInput, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
return addAutoclaveRecipe(aInput, aFluid, aOutput, aChance, aDuration, aEUt, aCleanroom);
}
+ @Override
public boolean addAutoclaveSpaceRecipe(ItemStack aInput, ItemStack aCircuit, FluidStack aFluid, ItemStack aOutput, int aChance, int aDuration, int aEUt, boolean aCleanroom) {
if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
return false;
@@ -1010,15 +1077,18 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) {
return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, null, null, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
}
+ @Override
public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) {
return addMixerRecipe(aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, null, null, null, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
}
- public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8,ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) {
+ @Override
+ public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4, ItemStack aInput5, ItemStack aInput6, ItemStack aInput7, ItemStack aInput8, ItemStack aInput9, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) {
return false;
}
@@ -1032,10 +1102,12 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt) {
return addLaserEngraverRecipe( aItemToEngrave, aLens, aEngravedItem, aDuration, aEUt, false);
}
+ @Override
public boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom) {
if ((aItemToEngrave == null) || (aLens == null) || (aEngravedItem == null)) {
return false;
@@ -1050,6 +1122,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) {
if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) {
return false;
@@ -1061,6 +1134,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) {
if ((aInput == null) || (aOutput == null)) {
return false;
@@ -1072,6 +1146,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
+ @Override
public boolean addSifterRecipe(ItemStack aItemToSift, ItemStack[] aSiftedItems, int[] aChances, int aDuration, int aEUt) {
if ((aItemToSift == null) || (aSiftedItems == null)) {
return false;
@@ -1093,7 +1168,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addArcFurnaceRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false);
}
- public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) {
+ @Override
+ public boolean addArcFurnaceRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) {
if ((aInput == null) || (aOutputs == null)) {
return false;
}
@@ -1121,6 +1197,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
+ @Override
public boolean addSimpleArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
if ((aInput == null) || (aOutputs == null) || aFluidInput == null) {
return false;
@@ -1137,6 +1214,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
+ @Override
public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt) {
if ((aInput == null) || (aOutputs == null) || aFluidInput == null) {
return false;
@@ -1153,6 +1231,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
+ @Override
public boolean addPlasmaArcFurnaceRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt) {
if ((aInput == null) || (aOutputs == null) || aFluidInput == null) {
return false;
@@ -1174,6 +1253,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addPulveriserRecipe(aInput, aOutputs, aChances, aDuration, aEUt, false);
}
+ @Override
public boolean addPulveriserRecipe(ItemStack aInput, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUt, boolean hidden) {
if ((aInput == null) || (aOutputs == null)) {
return false;
@@ -1208,16 +1288,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
@Override
@Deprecated
public boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) {
- //if ((aInput == null) || (aOutput == null)) {
- // return false;
- // }
- // if ((aDuration = GregTech_API.sRecipeFile.get("cracking", aInput.getUnlocalizedName(), aDuration)) <= 0) {
- // return false;
- // }
- // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
- // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, GT_ModHandler.getSteam(aInput.amount)}, new FluidStack[]{aOutput, Materials.Hydrogen.getGas(aInput.amount)}, aDuration, aEUt, 0);
- // GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, Materials.Hydrogen.getGas(aInput.amount)}, new FluidStack[]{new FluidStack(aOutput.getFluid(), (int) (aOutput.amount * 1.3))}, aDuration, aEUt, 0);
- // return true;
return false;
}
@@ -1309,6 +1379,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return addCircuitAssemblerRecipe(aInputs, aFluidInput, aOutput,aDuration,aEUt, false);
}
+ @Override
public boolean addCircuitAssemblerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, int aDuration, int aEUt, boolean aCleanroom) {
if (this.areItemsAndFluidsBothNull(aInputs, new FluidStack[]{aFluidInput})) {
@@ -1330,7 +1401,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
boolean ret = false;
for (int oreID : OreDictionary.getOreIDs(aOutput)) {
- if (OreDictionary.getOreName(oreID).contains("circuit")){
+ if (OreDictionary.getOreName(oreID).startsWith("circuit")){
return this.addCircuitAssemblerRecipeNonOredicted(aInputs, aFluidInput, aOutput, aDuration, aEUt, aCleanroom);
}
}
@@ -1338,8 +1409,8 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
for (int i = 0; i < aInputs.length; ++i) {
for (int oreID : OreDictionary.getOreIDs(aInputs[i])) {
String odName = OreDictionary.getOreName(oreID);
- if (odName.contains("circuit")) {
- for (ItemStack tStack : GT_OreDictUnificator.getOres(odName)) {
+ if (odName.startsWith("circuit")) {
+ for (ItemStack tStack : GT_OreDictUnificator.getOresImmutable(odName)) {
if (!GT_Utility.isStackValid(tStack))
continue;
aInputs[i] = new ItemStack(tStack.getItem(),aInputs[i].stackSize,tStack.getItemDamage());