aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus
diff options
context:
space:
mode:
authoriouter <3155186831@qq.com>2021-11-14 16:35:48 +0800
committeriouter <3155186831@qq.com>2021-11-14 16:35:48 +0800
commitc2ea5172788af9a0c66ad122c22659da599d77a9 (patch)
tree71df2438c9a149cecfdb5d0555acadfb117362eb /src/Java/gtPlusPlus
parent01f920644376e0d056b09fd6203035936af4e9ba (diff)
downloadGT5-Unofficial-c2ea5172788af9a0c66ad122c22659da599d77a9.tar.gz
GT5-Unofficial-c2ea5172788af9a0c66ad122c22659da599d77a9.tar.bz2
GT5-Unofficial-c2ea5172788af9a0c66ad122c22659da599d77a9.zip
separate recipes of the multiblock mixer
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java5
-rw-r--r--src/Java/gtPlusPlus/nei/NEI_GT_Config.java7
-rw-r--r--src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java28
6 files changed, 44 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 405dbea790..94e7cbb664 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -311,7 +311,7 @@ public class GTplusplus implements ActionListener {
0, 0, 0
};
int[] mInvalidCount = new int[]{
- 0, 0, 0
+ 0, 0, 0, 0
};
int[] mOriginalCount = new int[]{
0, 0, 0
@@ -332,6 +332,9 @@ public class GTplusplus implements ActionListener {
mInvalidCount[2] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells(
GT_Recipe.GT_Recipe_Map.sVacuumRecipes, GTPP_Recipe.GTPP_Recipe_Map.sAdvFreezerRecipes_GT
);
+ mInvalidCount[3] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells(
+ GT_Recipe.GT_Recipe_Map.sMixerRecipes, GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT
+ );
/*
//Large Centrifuge generation
diff --git a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
index 589e45ad90..07bd7ef46c 100644
--- a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
+++ b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java
@@ -27,6 +27,7 @@ implements IConfigureNEI {
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAdvFreezerRecipes_GT.mUnlocalizedName);
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mUnlocalizedName);
mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mUnlocalizedName);
+ mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mUnlocalizedName);
// Custom Recipe Maps
/*Logger.INFO("NEI Registration: "+CustomRecipeMap.sMappings.size()+" CustomRecipeMaps");
@@ -77,8 +78,10 @@ implements IConfigureNEI {
Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mNEIName);
new GT_NEI_multiCentriElectroFreezer(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT);
Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mNEIName);
- new GT_NEI_multiCentriElectroFreezer(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT);
-
+ new GT_NEI_multiCentriElectroFreezer(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT);
+ Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mNEIName);
+ new GT_NEI_multiCentriElectroFreezer(GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT);
+
Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName);
API.registerRecipeHandler(new DecayableRecipeHandler());
API.registerUsageHandler(new DecayableRecipeHandler());
diff --git a/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java b/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java
index fb815ca063..fcb7a2b093 100644
--- a/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java
+++ b/src/Java/gtPlusPlus/nei/NEI_IMC_Sender.java
@@ -14,7 +14,7 @@ public class NEI_IMC_Sender {
setNBTInfoAndSendIt("gtpp.recipe.cokeoven", "gregtech:gt.blockmachines:791");
setNBTInfoAndSendIt("gtpp.recipe.semifluidgeneratorfuels", "gregtech:gt.blockmachines:837");
setNBTInfoAndSendIt("gtpp.recipe.fishpond", "gregtech:gt.blockmachines:829");
- setNBTInfoAndSendIt("gtpp.recipe.advanced.mixer", "gregtech:gt.blockmachines:811");
+ setNBTInfoAndSendIt("gtpp.recipe.multimixer", "gregtech:gt.blockmachines:811");
setNBTInfoAndSendIt("gtpp.recipe.cryogenicfreezer", "gregtech:gt.blockmachines:910");
setNBTInfoAndSendIt("gtpp.recipe.fissionfuel", "gregtech:gt.blockmachines:835");
setNBTInfoAndSendIt("gtpp.recipe.geothermalfuel", "gregtech:gt.blockmachines:830");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
index 7e36b19b04..468567bfe1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
@@ -103,7 +103,7 @@ extends GregtechMeta_MultiBlockBase {
@Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sMixerRecipes;
+ return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT;
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
index b94dbfa51f..0d76114e57 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
@@ -93,7 +93,7 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells {
if (aFoundFluid == null) {
for (ItemStack aBadStack : mItemsToIgnore) {
if (doesItemMatchIgnoringStackSize(aInputStack, aBadStack)) {
- continue recipe; // Skip this recipe entirely if we find an item we don't like
+ continue recipe; // Skip this recipe entirely if we find an item we don't like
}
}
if (!isEmptyCell(aInputStack)) {
@@ -152,6 +152,10 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells {
aNewFluidOutputs[i] = aOutputFluidsMap.get(i);
}
+ //Skip repeatedly recipes
+ if (aOutputs.findRecipe(null, false, Integer.MAX_VALUE, aNewFluidInputs, aNewItemInputs) != null)
+ continue recipe;
+
// Add Recipe to map
GT_Recipe aNewRecipe = new GTPP_Recipe(
false,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 1f41bf84e3..0b4649e414 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -785,6 +785,34 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
+ public boolean addMultiblockMixerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
+ return false;
+ }
+ if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
+ Logger.INFO("[Recipe] Error generating Large Mixer recipe.");
+ Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
+ Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
+ Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
+ Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
+ return false;
+ }
+
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ aInputs,
+ aOutputs,
+ null,
+ aChances,
+ aFluidInputs,
+ aFluidOutputs,
+ aDuration,
+ aEUtick,
+ aSpecial);
+ GTPP_Recipe.GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.addRecipe(aRecipe);
+ return true;
+ }
+
public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) {
if (aInput1 instanceof String || aInput2 instanceof String) {
int mCompleted = 0;