aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2022-08-05 12:59:51 +0900
committerGitHub <noreply@github.com>2022-08-05 10:59:51 +0700
commit970ddeba130cc8abe29800023447536d7f79de8c (patch)
treec128f9a6af2cdcc3aed5f4e27579902b560b477f /src/main/java/gtPlusPlus/xmod/gregtech
parent82e73b6119996490d23801ee1fc930eb50589ed7 (diff)
downloadGT5-Unofficial-970ddeba130cc8abe29800023447536d7f79de8c.tar.gz
GT5-Unofficial-970ddeba130cc8abe29800023447536d7f79de8c.tar.bz2
GT5-Unofficial-970ddeba130cc8abe29800023447536d7f79de8c.zip
NEI Cleanup (#251)
* NEI Cleanup * adjustments
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java8
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java7
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java48
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java5
5 files changed, 32 insertions, 46 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
index 57ee99ee2e..283d520a54 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
@@ -486,7 +486,9 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
int aRecipes = GTPP_Recipe_Map.sTreeSimFakeRecipes.mRecipeList.size();
Logger.INFO("Adding Tree Growth Simulation for " + aSapling.getDisplayName() + " -> " + (aLog == null ? "NULL" : aLog.getDisplayName()));
ItemStack[] aOutput = new ItemStack[]{aLog, aSapling};
- GT_Recipe aRecipe = new GT_Recipe(
+ String aOutputs = ItemUtils.getArrayStackNames(aOutput);
+ Logger.INFO("" + aOutputs);
+ GTPP_Recipe_Map.sTreeSimFakeRecipes.addFakeRecipe(
false,
new ItemStack[]{aSapling.copy()},
aOutput,
@@ -497,10 +499,6 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase<
1,
sRecipeID++,
0);
- aRecipe.mOutputs = aOutput;
- String aOutputs = ItemUtils.getArrayStackNames(aRecipe.mOutputs);
- Logger.INFO("" + aOutputs);
- GTPP_Recipe_Map.sTreeSimFakeRecipes.addFakeRecipe(false, aRecipe);
return GTPP_Recipe_Map.sTreeSimFakeRecipes.mRecipeList.size() > aRecipes;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
index a76322e4f4..1b6e623e91 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
@@ -12,6 +12,8 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+import java.util.ArrayList;
+
public class RecipeGen_MultisUsingFluidInsteadOfCells {
@@ -158,7 +160,7 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells {
}
// Add Recipe to map
- GT_Recipe aNewRecipe = new GTPP_Recipe(
+ GT_Recipe aNewRecipe = new GTPP_Recipe.GTPP_Recipe_Map_MultiNoCell.GTPP_Recipe_MultiNoCell(
false,
aNewItemInputs,
aNewItemOutputs,
@@ -168,7 +170,8 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells {
aNewFluidOutputs,
x.mDuration,
x.mEUt,
- x.mSpecialValue);
+ x.mSpecialValue);
+ aNewRecipe.owners = new ArrayList<>(x.owners);
aOutputs.add(aNewRecipe);
aRecipesHandled++;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
index a09cbcce0d..de4f7fa49a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
@@ -56,7 +56,7 @@ public class RecipeLoader_LFTR {
FluidStack Li2BeF4 = NUCLIDE.Li2BeF4.getFluidStack(200);
//LiFBeF2ThF4UF4 - T3
- GT_Recipe LFTR1 = new GTPP_Recipe(
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(
false,
new ItemStack[] {},
new ItemStack[] {},
@@ -77,7 +77,7 @@ public class RecipeLoader_LFTR {
);
//LiFBeF2ZrF4UF4 - T2
- GT_Recipe LFTR2 = new GTPP_Recipe(
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(
false,
new ItemStack[] {},
new ItemStack[] {},
@@ -98,7 +98,7 @@ public class RecipeLoader_LFTR {
);
//LiFBeF2ZrF4U235 - T1
- GT_Recipe LFTR3 = new GTPP_Recipe(
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(
false,
new ItemStack[] {},
new ItemStack[] {},
@@ -163,10 +163,6 @@ public class RecipeLoader_LFTR {
new int[] {
1000, 1000, 1000, 1000, 1000
});
-
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR1);
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR2);
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR3);
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 75e48a0c00..9574dbb42e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -518,8 +518,11 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
ArrayUtils.removeNulls(aInput);
if (aInput.length <= 1) {
return false;
- }
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ }
+
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size();
+ int aSize2 = aSize;
+ GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(
true,
aInput,
aOutputStack,
@@ -528,12 +531,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
new FluidStack[] { aInputFluid },
new FluidStack[] { aOutput },
Math.max(1, aDuration),
- Math.max(1, aEUt),
- aSpecialValue);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.add(aSpecialRecipe);
+ Math.max(1, aEUt),
+ aSpecialValue);
aSize = GTPP_Recipe.GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mRecipeList.size();
@@ -588,7 +587,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 };
final FluidStack outputs[] = { aOutput1, aOutput2 };
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
+ int aSize2 = aSize;
+ GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.addRecipe(
aOptimise,
new ItemStack[] {},
new ItemStack[] {},
@@ -597,12 +598,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
inputs,
outputs,
Math.max(1, aDuration),
- Math.max(1, aEUt),
- 0);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.add(aSpecialRecipe);
+ Math.max(1, aEUt),
+ 0);
aSize = GTPP_Recipe.GTPP_Recipe_Map.sFissionFuelProcessing.mRecipeList.size();
if (aSize > aSize2) {
@@ -1438,7 +1435,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
@Override
public boolean addVacuumFurnaceRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aLevel) {
if (aInputs != null && aOutputs != null) {
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size();
+ int aSize2 = aSize;
+ GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.addRecipe(
false,
aInputs,
aOutputs,
@@ -1448,11 +1447,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
aFluidOutputs,
aDuration,
aEUt,
- aLevel);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.addRecipe(aSpecialRecipe);
+ aLevel);
aSize = GTPP_Recipe.GTPP_Recipe_Map.sVacuumFurnaceRecipes.mRecipeList.size();
return aSize > aSize2;
} else {
@@ -1506,8 +1501,9 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
CORE.crash();
}
-
- GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size();
+ int aSize2 = aSize;
+ GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.addRecipe(
false,
aInputs,
aOutputs,
@@ -1517,11 +1513,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
aFluidOutputs,
time,
(int) eu,
- aTier);
-
- int aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size();
- int aSize2 = aSize;
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.add(aSpecialRecipe);
+ aTier);
aSize = GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size();
return aSize > aSize2;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java
index b4cdf581ae..aeb937e78b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSolarTower.java
@@ -31,7 +31,7 @@ public class GregtechSolarTower {
0).getStackForm(1L));
// NEI recipe
- GTPP_Recipe aRecipe = new GTPP_Recipe(
+ GTPP_Recipe.GTPP_Recipe_Map.sSolarTowerRecipes.addRecipe(
false,
null,
null,
@@ -42,8 +42,5 @@ public class GregtechSolarTower {
0,
0,
0);
- GTPP_Recipe.GTPP_Recipe_Map.sSolarTowerRecipes.add(aRecipe);
-
-
}
}