From 18c7ac051b3e7c392666c63b7b439560ae915c07 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Sun, 19 Jun 2022 19:47:52 +0100 Subject: Add Plasma Forge (Endgame multi) (#1076) * Basis of changes. * Fix item stack and fluid vanishing. * Add new plasma forge UI, change tooltip and fix recipe map. * Fix corrupted fluid registry. * Fix fluids in recipes. Items still need adjusting. * Working. * Liquid spacetime and rename multi to D.T.P.S. so it can fit in GUI properly. * Make animation of spacetime fluid slower. * Fix recipe map (again). * Remove screwdriver junk. Clean up code slightly. * More cleaning. * Comments * Add hatch limitations and add some additional information. Also update NEI GUI. * Add proper recipes and change SpaceTime to a fluid not a gas. * Remove depreciated coil check (since I stole the IDs). * Remove depreciated coil check (since I stole the IDs). Add more comments. * Change temp of SpaceTime. * Add catalyst recipes + support for 16:16 fusion recipes. * Add comments. * Scala fix maybe? * Change plasma forge GUI. * Uncap temperature of materials. (Short -> Int) * Add chunkloading support (when multi is active). * Fix NEI merge issues. * fix used ids in kevlar * Add fluid support for laser engraver. * fix sh***t (cherry picked from commit 01851c100c52fd8292028cf6dda2cb136c617afc) * Add new intermediate materials to facilitate crafting. Also fix fusion typo. * Fix heat/fluid quantity display to be formatted correctly. * Change recipes to be more balanced. * Change residue fluid texture. * Restore better naming for multiblock. * Fix recipe typo. * Fix text not wrapping in multi controller. * Give laser engraver internal fluid storage. * Add IMC NEI support. * Update material properties. * Remove old dev comments. * Fix NEI texture. Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Martin Robertz --- src/main/java/gregtech/common/GT_RecipeAdder.java | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/main/java/gregtech/common/GT_RecipeAdder.java') diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index 7b9905669b..38acb4ac92 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -51,6 +51,26 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override + public boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion) { + if (FluidInputArray.length == 0) + return false; + + if (FluidOutputArray.length == 0) + return false; + + // If the recipe has more than 2 inputs or 2 outputs it is added to a different recipe map. + // This is so NEI can function properly and understand the recipe. Otherwise it gets cut off. + if ((FluidInputArray.length > 2) || (FluidInputArray.length > 2)) { + GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + return true; + } + + GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(null, FluidInputArray, FluidOutputArray, aFusionDurationInTicks, aFusionEnergyPerTick, aEnergyNeededForStartingFusion); + 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); @@ -247,6 +267,13 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + @Override + public boolean addPlasmaForgeRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, int coil_heat_level) { + GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, + FluidInputArray, FluidOutputArray, aDuration, aEUt, coil_heat_level); + 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)) { @@ -1223,6 +1250,14 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { return true; } + + @Override + public boolean addLaserEngraverRecipe(ItemStack[] ItemInputArray, FluidStack[] FluidInputArray, ItemStack[] OutputItemArray, FluidStack[] FluidOutputArray, int aDuration, int aEUt, boolean aCleanroom) { + GT_Recipe.GT_Recipe_Map.sLaserEngraverRecipes.addRecipe(false, ItemInputArray, OutputItemArray, null, null, + FluidInputArray, FluidOutputArray, aDuration, aEUt, aCleanroom ? -200 : 0); + return true; + } + @Override public boolean addFormingPressRecipe(ItemStack aItemToImprint, ItemStack aForm, ItemStack aImprintedItem, int aDuration, int aEUt) { if ((aItemToImprint == null) || (aForm == null) || (aImprintedItem == null)) { -- cgit