aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorDaniel Mendes <70096037+Steelux8@users.noreply.github.com>2023-05-01 11:37:36 +0100
committerGitHub <noreply@github.com>2023-05-01 12:37:36 +0200
commit7b1d0870c7d3a7e9da007563fff6fbbd86567312 (patch)
tree9dff14d2600bf533d825768cf766a8a6c7b42f02 /src/main/java
parent637dc68420055a8c8571e677576698b5101a5497 (diff)
downloadGT5-Unofficial-7b1d0870c7d3a7e9da007563fff6fbbd86567312.tar.gz
GT5-Unofficial-7b1d0870c7d3a7e9da007563fff6fbbd86567312.tar.bz2
GT5-Unofficial-7b1d0870c7d3a7e9da007563fff6fbbd86567312.zip
Add the Nuclear Salt Processing Plant (#607)
* New multi class and calling the class Enable the multi when loading Config handler for the multi More enabling Multi controller recipe Add necessary recipes to new, custom recipemap Add function to generate new recipes Declare item for the controller Define recipe map for the multi Render NEI page for the recipemap properly Change P output from 7 to 6 in recipe Spotless apply * Revert Wildcard on compat handler * Fixes in Salt Plant main class * Remove run1 method * Spotless apply * add isInputSeparationButtonEnabled override * spotlessApply (#615) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/util/GTPP_Recipe.java17
-rw-r--r--src/main/java/gtPlusPlus/GTplusplus.java8
-rw-r--r--src/main/java/gtPlusPlus/core/config/ConfigHandler.java6
-rw-r--r--src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java2
-rw-r--r--src/main/java/gtPlusPlus/core/lib/CORE.java1
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java18
-rw-r--r--src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java3
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_NuclearSaltProcessingPlant.java261
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNuclearSaltProcessingPlant.java21
12 files changed, 372 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/util/GTPP_Recipe.java b/src/main/java/gregtech/api/util/GTPP_Recipe.java
index c169170bb7..653c0f0930 100644
--- a/src/main/java/gregtech/api/util/GTPP_Recipe.java
+++ b/src/main/java/gregtech/api/util/GTPP_Recipe.java
@@ -317,6 +317,23 @@ public class GTPP_Recipe extends GT_Recipe implements IComparableRecipe {
"Total: " + MathUtils.formatNumbers(tDuration * tEUt * 4) + " EU");
});
+ public static final GT_Recipe_Map sNuclearSaltProcessingPlantRecipes = new GT_Recipe_Map_LargeNEI(
+ new HashSet<>(50),
+ "gtpp.recipe.nuclearsaltprocessingplant",
+ "Nuclear Salt Processing Plant",
+ null,
+ RES_PATH_GUI + "basicmachines/FissionFuel",
+ 0,
+ 6,
+ 0,
+ 0,
+ 1,
+ "",
+ 0,
+ "",
+ true,
+ true).setUsualFluidInputCount(2).setUsualFluidOutputCount(3);
+
// Ore Milling Map
public static final GT_Recipe_Map sOreMillRecipes = new GT_Recipe_Map(
new HashSet<>(10000),
diff --git a/src/main/java/gtPlusPlus/GTplusplus.java b/src/main/java/gtPlusPlus/GTplusplus.java
index f552ee2850..9dfe9356e9 100644
--- a/src/main/java/gtPlusPlus/GTplusplus.java
+++ b/src/main/java/gtPlusPlus/GTplusplus.java
@@ -288,7 +288,7 @@ public class GTplusplus implements ActionListener {
protected void generateGregtechRecipeMaps() {
int[] mValidCount = new int[] { 0, 0, 0 };
- int[] mInvalidCount = new int[] { 0, 0, 0, 0, 0 };
+ int[] mInvalidCount = new int[] { 0, 0, 0, 0, 0, 0, 0 };
int[] mOriginalCount = new int[] { 0, 0, 0 };
RecipeGen_BlastSmelterGT_GTNH.generateGTNHBlastSmelterRecipesFromEBFList();
@@ -312,6 +312,12 @@ public class GTplusplus implements ActionListener {
mInvalidCount[4] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells(
GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes,
GTPP_Recipe.GTPP_Recipe_Map.sMultiblockChemicalDehydratorRecipes);
+ mInvalidCount[5] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells(
+ GTPP_Recipe.GTPP_Recipe_Map.sColdTrapRecipes,
+ GTPP_Recipe.GTPP_Recipe_Map.sNuclearSaltProcessingPlantRecipes);
+ mInvalidCount[6] = RecipeGen_MultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells(
+ GTPP_Recipe.GTPP_Recipe_Map.sReactorProcessingUnitRecipes,
+ GTPP_Recipe.GTPP_Recipe_Map.sNuclearSaltProcessingPlantRecipes);
/*
* //Large Centrifuge generation mOriginalCount[0] =
* GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(); for (GT_Recipe x :
diff --git a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
index b6d5c977b7..296fc0518d 100644
--- a/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/main/java/gtPlusPlus/core/config/ConfigHandler.java
@@ -58,6 +58,7 @@ import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_LiquidFlu
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_MatterFabricator;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_MultiTank;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_NuclearFuelRefinery;
+import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_NuclearSaltProcessingPlant;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_PowerSubstation;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableMultiblock_ThermalBoiler;
import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableOldGTcircuits;
@@ -346,6 +347,11 @@ public class ConfigHandler {
GregTech.ID,
true,
"Refines molten chemicals into nuclear fuels.");
+ enableMultiblock_NuclearSaltProcessingPlant = config.getBoolean(
+ "enableMultiblockNuclearSaltProcessingPlant",
+ GregTech.ID,
+ true,
+ "Reprocesses depleted nuclear salts into useful chemicals.");
enableMultiblock_IndustrialSifter = config
.getBoolean("enableMultiblock_IndustrialSifter", GregTech.ID, true, "Large scale sifting.");
enableMultiblock_LargeAutoCrafter = config.getBoolean(
diff --git a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index 694cd86c69..f893486d4f 100644
--- a/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/main/java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -89,6 +89,7 @@ import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechIsaMill;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechLFTR;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechLargeTurbinesAndHeatExchanger;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechMolecularTransformer;
+import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNuclearSaltProcessingPlant;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechPollutionDevices;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechPowerBreakers;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechPowerSubStation;
@@ -149,6 +150,7 @@ public class COMPAT_HANDLER {
GregtechGeneratorsULV.run();
GregtechEnergyBuffer.run();
GregtechLFTR.run();
+ GregtechNuclearSaltProcessingPlant.run();
GregtechSteamCondenser.run();
GregtechSafeBlock.run();
GregtechIronBlastFurnace.run();
diff --git a/src/main/java/gtPlusPlus/core/lib/CORE.java b/src/main/java/gtPlusPlus/core/lib/CORE.java
index 918c767a8c..71a812e95a 100644
--- a/src/main/java/gtPlusPlus/core/lib/CORE.java
+++ b/src/main/java/gtPlusPlus/core/lib/CORE.java
@@ -192,6 +192,7 @@ public class CORE {
public static boolean enableMultiblock_MultiTank = true;
public static boolean enableMultiblock_PowerSubstation = true;
public static boolean enableMultiblock_LiquidFluorideThoriumReactor = true;
+ public static boolean enableMultiblock_NuclearSaltProcessingPlant = true;
public static boolean enableMultiblock_NuclearFuelRefinery = true;
public static boolean enableMultiblock_TreeFarmer = true;
public static boolean enableMultiblock_IndustrialSifter = true;
diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 92efee13b4..5f6a807746 100644
--- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -120,6 +120,9 @@ public class RECIPES_Machines {
public static ItemStack RECIPE_LFTROuterCasing;
public static ItemStack RECIPE_LFTRInnerCasing;
+ // Nuclear Salt Processing Plant
+ public static ItemStack RECIPE_SaltPlantController;
+
// Milling
public static ItemStack RECIPE_ISAMill_Controller;
public static ItemStack RECIPE_ISAMill_Gearbox;
@@ -2451,6 +2454,21 @@ public class RECIPES_Machines {
ALLOY.HS188A.getPlateDouble(1),
CI.getFieldGenerator(5, 1),
GregtechItemList.ReactorProcessingUnit_ZPM.get(1));
+
+ // Nuclear Salt Processing Plant Controller
+ RECIPE_SaltPlantController = GregtechItemList.Nuclear_Salt_Processing_Plant.get(1);
+
+ RecipeUtils.addShapedGregtechRecipe(
+ "plateOsmiridium",
+ GregtechItemList.ReactorProcessingUnit_IV.get(1),
+ "plateOsmiridium",
+ "plateRuridit",
+ CI.getTieredCircuitOreDictName(7),
+ "plateRuridit",
+ "plateOsmiridium",
+ GregtechItemList.ColdTrap_IV.get(1),
+ "plateOsmiridium",
+ RECIPE_SaltPlantController);
}
// Shelves
diff --git a/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
index 29f850a76c..3d54c9e7e1 100644
--- a/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
+++ b/src/main/java/gtPlusPlus/nei/NEI_IMC_Sender.java
@@ -56,6 +56,9 @@ public class NEI_IMC_Sender {
sendCatalyst("gtpp.recipe.reactorprocessingunit", "gregtech:gt.blockmachines:31031");
sendCatalyst("gtpp.recipe.reactorprocessingunit", "gregtech:gt.blockmachines:31032");
+ sendHandler("gtpp.recipe.nuclearsaltprocessingplant", "gregtech:gt.blockmachines:749");
+ sendCatalyst("gtpp.recipe.nuclearsaltprocessingplant", "gregtech:gt.blockmachines:749");
+
sendHandler("gtpp.recipe.treefarm", "gregtech:gt.blockmachines:836");
sendCatalyst("gtpp.recipe.treefarm", "gregtech:gt.blockmachines:836");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 4d9646357f..e341ee5a8c 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -309,6 +309,9 @@ public enum GregtechItemList implements GregtechItemContainer {
Casing_Reactor_I,
Casing_Reactor_II,
+ // Nuclear Salt Processing Plant
+ Nuclear_Salt_Processing_Plant,
+
// Multitank
/* Industrial_MultiTank, */
Industrial_MultiTankDense,
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_NuclearSaltProcessingPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_NuclearSaltProcessingPlant.java
new file mode 100644
index 0000000000..9f22887036
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_NuclearSaltProcessingPlant.java
@@ -0,0 +1,261 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static gregtech.api.enums.GT_HatchElement.Energy;
+import static gregtech.api.enums.GT_HatchElement.InputBus;
+import static gregtech.api.enums.GT_HatchElement.InputHatch;
+import static gregtech.api.enums.GT_HatchElement.Maintenance;
+import static gregtech.api.enums.GT_HatchElement.Muffler;
+import static gregtech.api.enums.GT_HatchElement.OutputBus;
+import static gregtech.api.enums.GT_HatchElement.OutputHatch;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
+
+import java.util.ArrayList;
+
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.TAE;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+
+public class GregtechMetaTileEntity_NuclearSaltProcessingPlant
+ extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_NuclearSaltProcessingPlant>
+ implements ISurvivalConstructable {
+
+ protected GT_Recipe lastRecipeToBuffer;
+ private int casing;
+ private static IStructureDefinition<GregtechMetaTileEntity_NuclearSaltProcessingPlant> STRUCTURE_DEFINITION = null;
+
+ public GregtechMetaTileEntity_NuclearSaltProcessingPlant(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntity_NuclearSaltProcessingPlant(String mName) {
+ super(mName);
+ }
+
+ @Override
+ public String getMachineType() {
+ return "Reactor Processing Unit, Cold Trap";
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
+ return new GregtechMetaTileEntity_NuclearSaltProcessingPlant(this.mName);
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack itemStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerSecond(ItemStack aStack) {
+ return CORE.ConfigSwitches.pollutionPerSecondMultiAutoCrafter;
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(getMachineType()).addInfo("Controller Block for the Nuclear Salt Processing Plant")
+ .addInfo("Processes depleted nuclear salts that come from the LFTR")
+ .addInfo("Handles the recipes of the Reactor Processor Unit and Cold Trap")
+ .addInfo("Only Thermally Insulated Casings can be replaced with hatches")
+ .addInfo("Mufflers on top, Energy Hatches on bottom, exactly 2 of each are required")
+ .addInfo("Maintenance Hatch goes on the back, opposite of the controller block")
+ .addInfo("Inputs go on the left side of the multi, outputs on the right side")
+ .addInfo("150% faster than using single block machines of the same voltage")
+ .addInfo("Processes two items per voltage tier").addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator().beginStructureBlock(3, 3, 3, true).addController("Front Center")
+ .addCasingInfoMin("IV Machine Casing", 58, false)
+ .addCasingInfoMin("Thermally Insulated Casing", 1, false).addInputBus("Left Half", 2)
+ .addInputHatch("Left Half", 2).addOutputBus("Right Half", 3).addOutputHatch("Right Half", 3)
+ .addMufflerHatch("Top Side, 2 Required", 4).addEnergyHatch("Bottom Side, 2 Required", 5)
+ .addMaintenanceHatch("Back Side, Opposite of Controller", 6)
+ .toolTipFinisher(CORE.GT_Tooltip_Builder.get());
+ return tt;
+ }
+
+ @Override
+ protected IIconContainer getActiveOverlay() {
+ return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE;
+ }
+
+ @Override
+ protected IIconContainer getInactiveOverlay() {
+ return Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER;
+ }
+
+ @Override
+ protected int getCasingTextureId() {
+ return TAE.getIndexFromPage(0, 10);
+ }
+
+ @Override
+ public IStructureDefinition<GregtechMetaTileEntity_NuclearSaltProcessingPlant> getStructureDefinition() {
+ if (STRUCTURE_DEFINITION == null) {
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_NuclearSaltProcessingPlant>builder()
+ .addShape(
+ mName,
+ transpose(
+ new String[][] { { "AAA AAA", "ADA ADA", "AAA AAA" },
+ { "ABBA ACCA", "B AAA C", "ABBA ACCA" },
+ { "ABBB~CCCA", "B C", "ABBBFCCCA" },
+ { "ABBA ACCA", "B AAA C", "ABBA ACCA" },
+ { "AAA AAA", "AEA AEA", "AAA AAA" } }))
+ .addElement('A', ofBlock(GregTech_API.sBlockCasings1, 5))
+ .addElement(
+ 'B',
+ buildHatchAdder(GregtechMetaTileEntity_NuclearSaltProcessingPlant.class)
+ .atLeast(InputBus, InputHatch).casingIndex(TAE.getIndexFromPage(0, 10)).dot(2)
+ .buildAndChain(
+ onElementPass(
+ x -> ++x.casing,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 8))))
+ .addElement(
+ 'C',
+ buildHatchAdder(GregtechMetaTileEntity_NuclearSaltProcessingPlant.class)
+ .atLeast(OutputBus, OutputHatch).casingIndex(TAE.getIndexFromPage(0, 10)).dot(3)
+ .buildAndChain(
+ onElementPass(
+ x -> ++x.casing,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 8))))
+ .addElement(
+ 'D',
+ buildHatchAdder(GregtechMetaTileEntity_NuclearSaltProcessingPlant.class).atLeast(Muffler)
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(4).buildAndChain(
+ onElementPass(
+ x -> ++x.casing,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 8))))
+ .addElement(
+ 'E',
+ buildHatchAdder(GregtechMetaTileEntity_NuclearSaltProcessingPlant.class).atLeast(Energy)
+ .casingIndex(TAE.getIndexFromPage(0, 10)).dot(5).buildAndChain(
+ onElementPass(
+ x -> ++x.casing,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 8))))
+ .addElement(
+ 'F',
+ buildHatchAdder(GregtechMetaTileEntity_NuclearSaltProcessingPlant.class)
+ .atLeast(Maintenance).casingIndex(TAE.getIndexFromPage(0, 10)).dot(6).buildAndChain(
+ onElementPass(
+ x -> ++x.casing,
+ ofBlock(ModBlocks.blockSpecialMultiCasings, 8))))
+ .build();
+ }
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public void construct(ItemStack itemStack, boolean hintsOnly) {
+ buildPiece(mName, itemStack, hintsOnly, 4, 2, 0);
+ }
+
+ @Override
+ public int survivalConstruct(ItemStack itemStack, int elementBudget, ISurvivalBuildEnvironment env) {
+ if (mMachine) return -1;
+ return survivialBuildPiece(mName, itemStack, 4, 2, 0, elementBudget, env, false, true);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity baseMetaTileEntity, ItemStack itemStack) {
+ casing = 0;
+ return checkPiece(mName, 4, 2, 0) && checkHatch();
+ }
+
+ @Override
+ public boolean checkHatch() {
+ return mEnergyHatches.size() == 2 && mMufflerHatches.size() == 2 && super.checkHatch();
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map.sNuclearSaltProcessingPlantRecipes;
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack itemStack) {
+ if (inputSeparation) {
+ for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) {
+ ArrayList<ItemStack> rList = new ArrayList<>();
+ for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null)
+ rList.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+
+ if (checkRecipeGeneric(
+ rList.toArray(new ItemStack[0]),
+ getStoredFluids().toArray(new FluidStack[0]),
+ getMaxParallelRecipes(),
+ getEuDiscountForParallelism(),
+ 150,
+ 10000)) {
+ return true;
+ }
+ }
+
+ return checkRecipeGeneric(
+ new ItemStack[0],
+ getStoredFluids().toArray(new FluidStack[0]),
+ getMaxParallelRecipes(),
+ getEuDiscountForParallelism(),
+ 150,
+ 10000);
+ } else {
+ return checkRecipeGeneric(
+ getStoredInputs().toArray(new ItemStack[0]),
+ getStoredFluids().toArray(new FluidStack[0]),
+ getMaxParallelRecipes(),
+ getEuDiscountForParallelism(),
+ 150,
+ 10000);
+ }
+ }
+
+ @Override
+ public int getMaxParallelRecipes() {
+ return 2 * (Math.max(1, GT_Utility.getTier(getMaxInputVoltage())));
+ }
+
+ @Override
+ public int getEuDiscountForParallelism() {
+ return 100;
+ }
+
+ @Override
+ public String[] getExtraInfoData() {
+ final String running = (this.mMaxProgresstime > 0 ? "Salt Plant running" : "Salt Plant stopped");
+ final String maintenance = (this.getIdealStatus() == this.getRepairStatus() ? "No Maintenance issues"
+ : "Needs Maintenance");
+ String tSpecialText;
+
+ if (lastRecipeToBuffer != null && lastRecipeToBuffer.mOutputs[0].getDisplayName() != null) {
+ tSpecialText = "Currently processing: " + lastRecipeToBuffer.mOutputs[0].getDisplayName();
+ } else {
+ tSpecialText = "Currently processing: Nothing";
+ }
+
+ return new String[] { "Nuclear Salt Processing Plant", running, maintenance, tSpecialText };
+ }
+
+ @Override
+ protected boolean isInputSeparationButtonEnabled() {
+ return true;
+ }
+}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java
index e85f4989d7..e088b50880 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java
@@ -188,9 +188,8 @@ public class RecipeLoader_NuclearFuelProcessing {
new ItemStack[] { ELEMENT.getInstance().FLUORINE.getCell(1), FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2),
ELEMENT.getInstance().PHOSPHORUS.getDust(1), ELEMENT.getInstance().PHOSPHORUS.getDust(1),
ELEMENT.getInstance().PHOSPHORUS.getDust(1), ELEMENT.getInstance().PHOSPHORUS.getDust(1),
- ELEMENT.getInstance().PHOSPHORUS.getDust(1), ELEMENT.getInstance().PHOSPHORUS.getDust(1),
- ELEMENT.getInstance().PHOSPHORUS.getDust(1) },
- new int[] { 10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000 },
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1), ELEMENT.getInstance().PHOSPHORUS.getDust(1) },
+ new int[] { 10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000 },
FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000),
20 * 60 * 10,
MaterialUtils.getVoltageForTier(4));
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 034f9550f4..2cb2ed2c5f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -1162,6 +1162,37 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return true;
}
+ public boolean addNuclearSaltProcessingPlantRecipe(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 Salt Plant 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.sNuclearSaltProcessingPlantRecipes.addRecipe(aRecipe);
+ return true;
+ }
+
@Override
public boolean addFluidHeaterRecipe(ItemStack aInput, FluidStack aFluidInput, FluidStack aOutput, int aDuration,
int aEUt) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNuclearSaltProcessingPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNuclearSaltProcessingPlant.java
new file mode 100644
index 0000000000..4cd9b63567
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechNuclearSaltProcessingPlant.java
@@ -0,0 +1,21 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_NuclearSaltProcessingPlant;
+
+public class GregtechNuclearSaltProcessingPlant {
+
+ public static void run() {
+ Logger.INFO("Gregtech5u Content | Registering Nuclear Salt Processing Plant Multiblock.");
+ if (CORE.ConfigSwitches.enableMultiblock_NuclearSaltProcessingPlant) {
+ // Nuclear Salt Processing Plant Multiblock
+ GregtechItemList.Nuclear_Salt_Processing_Plant.set(
+ new GregtechMetaTileEntity_NuclearSaltProcessingPlant(
+ 749,
+ "nuclearsaltprocessingplant.controller.tier.single",
+ "Nuclear Salt Processing Plant").getStackForm(1L));
+ }
+ }
+}