aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorConnor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>2022-06-22 23:03:38 +0100
committerGitHub <noreply@github.com>2022-06-23 00:03:38 +0200
commitba6bc0844281558f35cce72b54267064f6d86208 (patch)
tree92577639d247cd6f255865ed2462f46b0ea3ad80 /src/main/java
parent2b272a028ffe3c133f6d8011bb6a6b37d2c44b31 (diff)
downloadGT5-Unofficial-ba6bc0844281558f35cce72b54267064f6d86208.tar.gz
GT5-Unofficial-ba6bc0844281558f35cce72b54267064f6d86208.tar.bz2
GT5-Unofficial-ba6bc0844281558f35cce72b54267064f6d86208.zip
Plasma forge fixes (#1086)
* 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. * Update/fix plasma forge recipes. * Increase max hatch count. * Increase max hatch count and fix mixing energy hatches. Plus quick check for processing time. * Fix spacetime recipe. * Update spacetime textures and add new item textures. * Remove manual spacetime fluid addition. * Add custom fluid texture override ability. * Update infinity and spacetime to use new custom fluid override texture. * Depreciate old recipe adding methods. * Refactor GT NEI handler. * Remove unnecessary import. * Remove debug comment. * Clean up auto generated fluid code. * Fix NPE and add a few comments. * Refactor GT NEI handler. * Update NEI GUIs. * More NEI fixes. * Update LCR NEI GUI. * Update error message. Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/api/enums/Materials.java25
-rw-r--r--src/main/java/gregtech/api/enums/TextureSet.java12
-rw-r--r--src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java15
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java2
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java38
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java11
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java81
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java3
-rw-r--r--src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java622
9 files changed, 286 insertions, 523 deletions
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java
index a2069f0d05..4b36ce74ee 100644
--- a/src/main/java/gregtech/api/enums/Materials.java
+++ b/src/main/java/gregtech/api/enums/Materials.java
@@ -817,7 +817,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
*/
//TODO: add other op materials? maybe some new ores or new only fusion made op materials from op materials??? like neutronium bedrockium alloy etc.
public static Materials InfinityCatalyst = new Materials( 394, TextureSet.SET_SHINY , 64.0F,1310720, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "InfinityCatalyst" , "Infinity Catalyst" , 5, 500000, 10800, 10800, true, false, 20, 1, 1, Dyes.dyeLightGray );
- public static Materials Infinity = new Materials( 397, TextureSet.SET_CUSTOM("infinity"), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray );
+ public static Materials Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray );
public static Materials Bedrockium = new MaterialBuilder(395,TextureSet.SET_DULL, "Bedrockium").addOreItems().addDustItems().addMetalItems().setDurability(327680).setToolSpeed(8f).setToolQuality(9).setRGB(50,50,50).setName("Bedrockium").setBlastFurnaceRequired(true).setBlastFurnaceTemp(9900).setMeltingPoint(9900).setColor(Dyes.dyeBlack).setOreValue(4).setDensityDivider(1).setDensityMultiplier(1).constructMaterial();
public static Materials Trinium = new Materials( 868, TextureSet.SET_SHINY , 128.0F, 51200, 8, 1|2 |8 |64|128 , 200, 200, 210, 0, "Trinium" , "Trinium" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeLightGray ).disableAutoGeneratedBlastFurnaceRecipes();
public static Materials Ichorium = new Materials( 978, TextureSet.SET_SHINY , 32.0F, 850000, 7, 1|2 |8 |32|64|128 , 211, 120, 6, 0, "Ichorium" , "Ichorium" , 5, 250000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeOrange );
@@ -859,7 +859,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
public static Materials DimensionallyTranscendentResidue = new Materials( 589, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 0, 1, "DimensionallyTranscendentResidue" , "Dimensionally Transcendent Residue" , -1, -1, 25, 1, false, true, 1, 1, 1, Dyes.dyeBlack);
- public static Materials SpaceTime = new Materials( 588, TextureSet.SET_FLUID , 1.0F, 0, 2, 16 , 0, 0, 255, 240, "SpaceTime" , "SpaceTime" , -1, -1, 14, 0, false, true, 2, 1, 1, Dyes.dyeBlue , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1)));
+ public static Materials SpaceTime = new Materials( 588, new TextureSet("spacetime", true) , 1.0F, 0, 2, 1|2|16|64|128, 255, 255, 255, 0, "SpaceTime" , "SpaceTime" , -1, -1, 14, 0, false, true, 2, 1, 1, Dyes._NULL , Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1)));
+
/**
* Materials which are renamed automatically
@@ -2256,10 +2257,22 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
}
private static void addHasGasFluid(Materials aMaterial, String aConfigPath) {
- if (aMaterial.mHasPlasma = GregTech_API.sMaterialProperties.get(aConfigPath, "AddPlasma", aMaterial.mHasPlasma))
- GT_Mod.gregtechproxy.addAutogeneratedPlasmaFluid(aMaterial);
- if (aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas))
- GT_Mod.gregtechproxy.addFluid(aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp);
+// System.out.println("ABC4321 " + aMaterial.mDefaultLocalName + " " + aMaterial.mIconSet.is_custom + " " + aMaterial.mName);
+// if (aMaterial.mDefaultLocalName.toLowerCase().contains("spacetime")) {
+//// GT_Mod.gregtechproxy.addFluid("molten.spacetime", "Molten SpaceTime", Materials.SpaceTime, 0, 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SpaceTime, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 100);
+// System.out.println("TESTING 1234");
+// System.out.println("ABC4321 " + aMaterial.mDefaultLocalName + " " + aMaterial.mIconSet.is_custom + " " + aMaterial.mName + " " + aMaterial.mHasPlasma + " " + aMaterial.mHasGas);
+// return;
+// }
+
+ if (aMaterial.mIconSet.is_custom) {
+ return;
+ } else {
+ if (aMaterial.mHasPlasma = GregTech_API.sMaterialProperties.get(aConfigPath, "AddPlasma", aMaterial.mHasPlasma))
+ GT_Mod.gregtechproxy.addAutogeneratedPlasmaFluid(aMaterial);
+ if (aMaterial.mHasGas = GregTech_API.sMaterialProperties.get(aConfigPath, "AddGas", aMaterial.mHasGas))
+ GT_Mod.gregtechproxy.addFluid(aMaterial.mName.toLowerCase(), aMaterial.mDefaultLocalName, aMaterial, 2, aMaterial.mGasTemp);
+ }
}
private static void addInternalStuff(Materials aMaterial, String aConfigPath) {
diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java
index fd82fd676e..6e6ef99e36 100644
--- a/src/main/java/gregtech/api/enums/TextureSet.java
+++ b/src/main/java/gregtech/api/enums/TextureSet.java
@@ -1,12 +1,9 @@
package gregtech.api.enums;
-
import gregtech.api.interfaces.IIconContainer;
public class TextureSet {
- public static final TextureSet SET_CUSTOM(String aTextureFileName) {
- return new TextureSet("CUSTOM/" + aTextureFileName);
- }
+ public boolean is_custom = false;
public static final TextureSet
SET_NONE = new TextureSet("NONE"),
@@ -56,6 +53,7 @@ public class TextureSet {
private static final String aTextVoidDir = "/void";
public TextureSet(String aSetName) {
+ boolean is_custom = false;
mSetName = aSetName;
mTextures[0] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/dustTiny");
mTextures[1] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/dustSmall");
@@ -186,4 +184,10 @@ public class TextureSet {
mTextures[126] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/handleMallet");
mTextures[127] = new Textures.ItemIcons.CustomIcon(aTextMatIconDir + mSetName + "/toolHeadMallet");
}
+
+ public TextureSet(String aSetName, boolean is_custom) {
+ this("CUSTOM/" + aSetName);
+ this.is_custom = is_custom;
+ }
+
}
diff --git a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
index fb2f15f49a..4f4f174330 100644
--- a/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
+++ b/src/main/java/gregtech/api/interfaces/internal/IGT_RecipeAdder.java
@@ -23,21 +23,22 @@ public interface IGT_RecipeAdder {
* @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0)
* @return true if the Recipe got added, otherwise false.
*/
+
+ @Deprecated
boolean addFusionReactorRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion);
/**
* Adds a Fusion Reactor Recipe
*
- * @param FluidOutputArray : Array of input fluids.
- * @param FluidOutputArray : Array of output fluids.
+ * @param FluidOutputArray : Array of input fluids. Up to 16.
+ * @param FluidOutputArray : Array of output fluids. Up to 16.
* @param aFusionDurationInTicks : How many ticks the Fusion lasts (must be > 0).
- * @param aFusionEnergyPerTick : The EU generated per Tick (can even be negative!).
- * @param aEnergyNeededForStartingFusion : EU needed for heating the Reactor up (must be >= 0).
- * @return true if the Recipe got added, otherwise false.
+ * @param aFusionEnergyPerTick : The EU consumed per tick to keep the reaction going.
+ * @param aEnergyNeededForStartingFusion : EU needed to initialize the fusion reaction. (must be >= 0).
+ * @return true if the recipe got added, otherwise false.
*/
boolean addFusionReactorRecipe(FluidStack[] FluidInputArray, FluidStack[] FluidOutputArray, int aFusionDurationInTicks, int aFusionEnergyPerTick, int aEnergyNeededForStartingFusion);
-
/**
* Adds a Centrifuge Recipe
*
@@ -656,11 +657,13 @@ public interface IGT_RecipeAdder {
/**
* Adds a Recipe for the Laser Engraver.
*/
+ @Deprecated
boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt);
/**
* Adds a Recipe for the Laser Engraver.
*/
+ @Deprecated
boolean addLaserEngraverRecipe(ItemStack aItemToEngrave, ItemStack aLens, ItemStack aEngravedItem, int aDuration, int aEUt, boolean aCleanroom);
/**
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 833059f195..1907245715 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -1966,7 +1966,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
private static final int FLUID_OUTPUT_COUNT = 4;
public GT_Recipe_Map_LargeChemicalReactor() {
- super(new HashSet<>(1000), "gt.recipe.largechemicalreactor", "Large Chemical Reactor", null, RES_PATH_GUI + "basicmachines/Default", 2, OUTPUT_COUNT, 0, 0, 1, E, 1, E, true, true);
+ super(new HashSet<>(1000), "gt.recipe.largechemicalreactor", "Large Chemical Reactor", null, RES_PATH_GUI + "basicmachines/LCRNEI", 2, OUTPUT_COUNT, 0, 0, 1, E, 1, E, true, true);
}
@Override
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 8491ea328c..dc8ca19220 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1821,25 +1821,42 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return 0;
}
+
+ // ------------------------ Adds all fluids corresponding to materials ------------------------
+
public Fluid addAutoGeneratedCorrespondingFluid(Materials aMaterial){
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
- }
+ // If the fluid is registered as custom inside the Material's constructor then to add custom fluid
+ // textures go to blocks/fluids and place the .png. File should be called fluid.fluid.{unlocalised_name}.png. All lower case.
+ String fluidTexture = aMaterial.mIconSet.is_custom ? ("fluid." + aMaterial.mName.toLowerCase()) : "molten.autogenerated";
+ return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial,
+ aMaterial.mRGBa, 1, aMaterial.getLiquidTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
+ }
public Fluid addAutoGeneratedCorrespondingGas(Materials aMaterial) {
- return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", aMaterial.mDefaultLocalName, aMaterial,
- aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
+ // If the fluid is registered as custom inside the Material's constructor then to add custom fluid
+ // textures go to blocks/fluids and place the .png. File should be called fluid.gas.{unlocalised_name}.png. All lower case.
+ String fluidTexture = aMaterial.mIconSet.is_custom ? ("gas." + aMaterial.mName.toLowerCase()) : "molten.autogenerated";
+ return addFluid(aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName, aMaterial,
+ aMaterial.mRGBa, 2, aMaterial.getGasTemperature(), GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 1000);
+ }
+
+ public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
+ // If the fluid is registered as custom inside the Material's constructor then to add custom fluid
+ // textures go to blocks/fluids and place the .png. File should be called fluid.plasma.{unlocalised_name}.png. All lower case.
+ String fluidTexture = aMaterial.mIconSet.is_custom ? ("plasma." + aMaterial.mName.toLowerCase()) : "plasma.autogenerated";
+ return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, aMaterial.mDefaultLocalName + " Plasma", aMaterial,
+ aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000);
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
- return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
+ // If the fluid is registered as custom inside the Material's constructor then to add custom fluid
+ // textures go to blocks/fluids and place the .png. File should be called fluid.molten.{unlocalised_name}.png. All lower case.
+ String fluidTexture = aMaterial.mIconSet.is_custom ? ("molten." + aMaterial.mName.toLowerCase()) : "molten.autogenerated";
+ return addFluid("molten." + aMaterial.mName.toLowerCase(Locale.ENGLISH), fluidTexture, "Molten " + aMaterial.mDefaultLocalName, aMaterial,
aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, GT_OreDictUnificator.get(OrePrefixes.cellMolten, aMaterial, 1L), ItemList.Cell_Empty.get(1L), 144);
}
- public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
- return addFluid("plasma." + aMaterial.mName.toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
- aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L), aMaterial.getMolten(1) != null ? 144 : 1000);
- }
+ // ------------------------------------------------------------------------------------------------------------
public void addAutoGeneratedHydroCrackedFluids(Materials aMaterial){
Fluid[] crackedFluids = new Fluid[3];
@@ -1910,6 +1927,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK,
ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) {
aName = aName.toLowerCase(Locale.ENGLISH);
+
Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA());
GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalized == null ? aName : aLocalized);
if (FluidRegistry.registerFluid(rFluid)) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
index 34c38537a9..97bda10e2f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PlasmaForge.java
@@ -195,6 +195,7 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
// Vital recipe info.
mEUt = -tRecipe.mEUt;
mMaxProgresstime = tRecipe.mDuration;
+ mMaxProgresstime = Math.max(1, mMaxProgresstime);
// Outputs.
mOutputItems = tRecipe.mOutputs.clone();
@@ -223,15 +224,23 @@ public class GT_MetaTileEntity_PlasmaForge extends GT_MetaTileEntity_AbstractMul
if (mOutputBusses.size() > 3)
return false;
- if (mInputHatches.size() > 3)
+ // Numerous input hatches required to satisfy fluid inputs for superconductor recipes.
+ if (mInputHatches.size() > 6)
return false;
if (mOutputHatches.size() > 3)
return false;
+ // Check that there is between 1 and 2 energy hatches in the multi.
if (!((mEnergyHatches.size() == 1) || (mEnergyHatches.size() == 2)))
return false;
+ // Check whether each energy hatch is the same tier.
+ byte tier_of_hatch = mEnergyHatches.get(0).mTier;
+ for(GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) {
+ if (energyHatch.mTier != tier_of_hatch) { return false; }
+ }
+
if (mMaintenanceHatches.size() != 1)
return false;
diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
index c3c43dbb7d..280234bf7d 100644
--- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
+++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
@@ -620,110 +620,113 @@ public class GT_MachineRecipeLoader implements Runnable {
// Neutronium Smelting.
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTCC.getFluid(20645L), Materials.Iron.getMolten(73728L)},
+ new FluidStack[]{Materials.ExcitedDTCC.getFluid(22119L), Materials.Iron.getMolten(73728L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2580L), Materials.Neutronium.getMolten(73728L)},
- 2500, 50331648, 10900);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(22119L/8), Materials.Neutronium.getMolten(73728L)},
+ 2500, 25_165_824, 10900);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTPC.getFluid(9861L), Materials.Iron.getMolten(147456L)},
+ new FluidStack[]{Materials.ExcitedDTPC.getFluid(10241L), Materials.Iron.getMolten(147456L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2465L), Materials.Neutronium.getMolten(147456L)},
- 1250, 100663296, 11800);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10241L/4), Materials.Neutronium.getMolten(147456L)},
+ 1250, 50_331_648, 11800);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTRC.getFluid(4456L), Materials.Iron.getMolten(294912L)},
+ new FluidStack[]{Materials.ExcitedDTRC.getFluid(4553L), Materials.Iron.getMolten(294912L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2228L), Materials.Neutronium.getMolten(294912L)},
- 625, 201326592, 12700);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4553L/2), Materials.Neutronium.getMolten(294912L)},
+ 625, 100_663_296, 12700);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTEC.getFluid(1905L), Materials.Iron.getMolten(589824L)},
+ new FluidStack[]{Materials.ExcitedDTEC.getFluid(1930L), Materials.Iron.getMolten(589824L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1905L), Materials.Neutronium.getMolten(589824L)},
- 312, 402653184, 13600);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1930L), Materials.Neutronium.getMolten(589824L)},
+ 312, 201_326_592, 13600);
// Cosmic Neutronium Smelting.
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTCC.getFluid(35283L), Materials.Copper.getMolten(73728L)},
+ new FluidStack[]{Materials.ExcitedDTCC.getFluid(10507L), Materials.Copper.getMolten(512L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4410), Materials.CosmicNeutronium.getMolten(73728L)},
- 4200, 51200000, 10900);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10507L/8), Materials.CosmicNeutronium.getMolten(512L*144L)},
+ 4200, 7_115_337, 10900);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTPC.getFluid(16853L), Materials.Copper.getMolten(147456L)},
+ new FluidStack[]{Materials.ExcitedDTPC.getFluid(4864L), Materials.Copper.getMolten(1024L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4213L), Materials.CosmicNeutronium.getMolten(147456L)},
- 2100, 102400000, 11800);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(4864L/4), Materials.CosmicNeutronium.getMolten(1024L*144L)},
+ 2100, 14_230_674, 11800);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTRC.getFluid(7616L), Materials.Copper.getMolten(294912L)},
+ new FluidStack[]{Materials.ExcitedDTRC.getFluid(2163L), Materials.Copper.getMolten(2048L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3808L), Materials.CosmicNeutronium.getMolten(294912L)},
- 1050, 204800000, 12700);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(2163L/2), Materials.CosmicNeutronium.getMolten(2048L*144L)},
+ 1050, 28_461_349, 12700);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTEC.getFluid(3256L), Materials.Copper.getMolten(589824L)},
+ new FluidStack[]{Materials.ExcitedDTEC.getFluid(917L), Materials.Copper.getMolten(4096L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3256L), Materials.CosmicNeutronium.getMolten(589824L)},
- 525, 409600000, 13600);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(917L), Materials.CosmicNeutronium.getMolten(4096L*144L)},
+ 525, 56_922_697, 13600);
+
+ // Infinity & SC Smelting.
+ // See core mod.
+
+ // Bedrockium.
- // Infinity Smelting.
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTCC.getFluid(91933L), Materials.InfinityCatalyst.getMolten(28800L)},
+ new FluidStack[]{Materials.ExcitedDTCC.getFluid(3360L), Materials.Steel.getMolten(2048L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(11491L), Materials.Infinity.getMolten(28800L)},
- 4200, 112066560, 10900);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(3360L/8), Materials.Bedrockium.getMolten(2048L*144L)},
+ 3360, 29_659_721, 10900);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTPC.getFluid(43917), Materials.InfinityCatalyst.getMolten(57600L)},
+ new FluidStack[]{Materials.ExcitedDTPC.getFluid(1680L), Materials.Steel.getMolten(4096L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10979), Materials.Infinity.getMolten(57600L)},
- 2100, 224133120, 11800);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(1680L/4), Materials.Bedrockium.getMolten(4096L*144L)},
+ 1680, 59_319_442, 11800);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTRC.getFluid(19843L), Materials.InfinityCatalyst.getMolten(115200L)},
+ new FluidStack[]{Materials.ExcitedDTRC.getFluid(840L), Materials.Steel.getMolten(8192L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(9921L), Materials.Infinity.getMolten(115200L)},
- 1050, 448266240, 12700);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(840L/2), Materials.Bedrockium.getMolten(8192L*144L)},
+ 840, 118_638_885, 12700);
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.ExcitedDTEC.getFluid(8484L), Materials.InfinityCatalyst.getMolten(230400L)},
+ new FluidStack[]{Materials.ExcitedDTEC.getFluid(420L), Materials.Steel.getMolten(16384L*144L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(8484L), Materials.Infinity.getMolten(230400L)},
- 525, 896532480, 13600);
+ new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(420L), Materials.Bedrockium.getMolten(16384L*144L)},
+ 420, 237_277_769, 13600);
// Misc
-
GT_Values.RA.addPlasmaForgeRecipe(
new ItemStack[]{GT_Values.NI},
new FluidStack[]{Materials.DimensionallyTranscendentResidue.getFluid(10000L), Materials.Infinity.getMolten(9216L)},
new ItemStack[]{GT_Values.NI},
- new FluidStack[]{Materials.SpaceTime.getFluid(1L)},
+ new FluidStack[]{Materials.SpaceTime.getMolten(1L)},
2000, 2000000000, 12700);
// -----------------------------------------------------------------------------------------------------------------------------
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
index 36534f0399..7f4fc25bbe 100644
--- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
+++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
@@ -522,10 +522,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable {
GT_Mod.gregtechproxy.addFluid("refinedGlue", "Refined Glue", Materials.Glue, 1, 295, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("hotfryingoil", "Hot Frying Oil", Materials.FryingOilHot, 1, 400, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.FryingOilHot, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
- GT_Mod.gregtechproxy.addFluid("SpaceTime", "SpaceTime", Materials.SpaceTime, 1, 0, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SpaceTime, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
-
GT_Mod.gregtechproxy.addFluid("DimensionallyTranscendentResidue", "Dimensionally Transcendent Residue", Materials.DimensionallyTranscendentResidue, 1, 2000000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.DimensionallyTranscendentResidue, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
-
GT_Mod.gregtechproxy.addFluid("ExcitedDTCC", "Excited Dimensionally Transcendent Crude Catalyst", Materials.ExcitedDTCC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTCC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("ExcitedDTPC", "Excited Dimensionally Transcendent Prosaic Catalyst", Materials.ExcitedDTPC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTPC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
GT_Mod.gregtechproxy.addFluid("ExcitedDTRC", "Excited Dimensionally Transcendent Resplendent Catalyst", Materials.ExcitedDTRC, 1, 500000000, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.ExcitedDTRC, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
index 153fb03f43..83721b39d5 100644
--- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
+++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
@@ -614,493 +614,209 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler {
}
}
- public class CachedDefaultRecipe
- extends TemplateRecipeHandler.CachedRecipe {
+ public class CachedDefaultRecipe extends TemplateRecipeHandler.CachedRecipe {
public final GT_Recipe mRecipe;
public final List<PositionedStack> mOutputs;
public final List<PositionedStack> mInputs;
- public CachedDefaultRecipe(GT_Recipe aRecipe) {
- super();
- this.mRecipe = aRecipe;
- List<PositionedStack> maybeIn;
- List<PositionedStack> maybeOut;
-
- try {
- maybeIn = aRecipe.getInputPositionedStacks();
- } catch (NullPointerException npe) {
- maybeIn = null;
- GT_Log.err.println("CachedDefaultRecipe - Invalid InputPositionedStacks " + aRecipe);
- npe.printStackTrace(GT_Log.err);
- }
- try {
- maybeOut = aRecipe.getOutputPositionedStacks();
- } catch (NullPointerException npe) {
- maybeOut = null;
- GT_Log.err.println("CachedDefaultRecipe - Invalid OutputPositionedStacks " + aRecipe);
- npe.printStackTrace(GT_Log.err);
+ // Draw a grid of fluids and items (in that order).
+ private void drawNEIItemAndFluidGrid(ItemStack[] ItemArray, FluidStack[] FluidArray, int x_coord_origin, int y_coord_origin, int x_dir_max_items, int y_max_dir_max_items, GT_Recipe Recipe, boolean is_input) {
+ if (ItemArray.length + FluidArray.length > x_dir_max_items * y_max_dir_max_items) {
+ GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many items/fluids.");
}
- if (maybeIn != null && maybeOut != null) {
- mInputs = maybeIn;
- mOutputs = maybeOut;
- return;
- }
+ int x_max = x_coord_origin + x_dir_max_items * 18;
- mOutputs = new ArrayList<>();
- mInputs = new ArrayList<>();
+ int x_coord = x_coord_origin;
+ int y_coord = y_coord_origin;
- int tStartIndex = 0;
- switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) {
- case 0:
- break;
- case 1:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
- }
- tStartIndex++;
- break;
- case 2:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
- }
- tStartIndex++;
- break;
- case 3:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
- }
- tStartIndex++;
- break;
- case 4:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23));
- }
- tStartIndex++;
- break;
- case 5:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23));
- }
- tStartIndex++;
- break;
- case 6:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 5));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 23));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 23));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 23));
- }
- tStartIndex++;
- break;
- case 7:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32));
- }
- tStartIndex++;
- break;
- case 8:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32));
- }
- tStartIndex++;
- break;
- default:
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, -4));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 14));
- }
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 14));
+ for(FluidStack fluid : FluidArray) {
+ if (fluid != GT_Values.NF) {
+ if (is_input) {
+ this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, true));
+ } else {
+ this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput));
}
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 12, 32));
+ x_coord += 18;
+ if (x_coord == x_max) {
+ x_coord = x_coord_origin;
+ y_coord += 18;
}
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 30, 32));
+ }
+ }
+
+ // Iterate over all items in array and display them.
+ int special_counter = 0;
+ for(ItemStack item : ItemArray) {
+ if (item != GT_Values.NI) {
+ if (is_input) {
+ mInputs.add(new FixedPositionedStack(item, x_coord, y_coord, true));
+ } else {
+ mOutputs.add(new FixedPositionedStack(item, x_coord, y_coord, Recipe.getOutputChance(special_counter), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput));
+ special_counter++;
}
- tStartIndex++;
- if (aRecipe.getRepresentativeInput(tStartIndex) != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.getRepresentativeInput(tStartIndex), 48, 32));
+ x_coord += 18;
+ if (x_coord == x_max) {
+ x_coord = x_coord_origin;
+ y_coord += 18;
}
- tStartIndex++;
+ }
}
- if (aRecipe.mSpecialItems != null) {
- this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52));
+
+ };
+
+
+ // Draws a grid of items for NEI rendering.
+ private void drawNEIItemGrid(ItemStack[] ItemArray, int x_coord_origin, int y_coord_origin, int x_dir_max_items, int y_max_dir_max_items, GT_Recipe Recipe, boolean is_input) {
+ if (ItemArray.length > x_dir_max_items * y_max_dir_max_items) {
+ GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many items.");
}
- tStartIndex = 0;
- boolean tUnificate = GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput;
- switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) {
- case 0:
- break;
- case 1:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 2:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 3:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 4:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 5:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 6:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 5, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 23, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 7:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- case 8:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- break;
- default:
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, -4, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 14, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 102, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
- }
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 120, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
+ // 18 pixels to get to a new grid for placing a item tile since they are 16x16 and have 1 pixel buffers around them.
+ int x_max = x_coord_origin + x_dir_max_items * 18;
+
+ // Temp variables to keep track of current coords to place item at.
+ int x_coord = x_coord_origin;
+ int y_coord = y_coord_origin;
+
+ // Iterate over all items in array and display them.
+ int special_counter = 0;
+ for(ItemStack item : ItemArray) {
+ if (item != GT_Values.NI) {
+ if (is_input) {
+ mInputs.add(new FixedPositionedStack(item, x_coord, y_coord, true));
+ } else {
+ mOutputs.add(new FixedPositionedStack(item, x_coord, y_coord, Recipe.getOutputChance(special_counter), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput));
+ special_counter++;
}
- tStartIndex++;
- if (aRecipe.getOutput(tStartIndex) != null) {
- this.mOutputs.add(new FixedPositionedStack(aRecipe.getOutput(tStartIndex), 138, 32, aRecipe.getOutputChance(tStartIndex), tUnificate));
+ x_coord += 18;
+ if (x_coord == x_max) {
+ x_coord = x_coord_origin;
+ y_coord += 18;
}
- tStartIndex++;
+ }
}
+ }
- // Generates a 4x4 grid of fluid icons if it's a complex fusion recipe.
- if (GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes == GT_NEI_DefaultHandler.this.mRecipeMap) {
- // 1234
- int x_coord = 3;
- int y_coord = -1;
+ // Draws a grid of fluids for NEI rendering.
+ private void drawNEIFluidGrid(FluidStack[] FluidArray, int x_coord_origin, int y_coord_origin, int x_dir_max_fluids, int y_max_dir_max_fluids, GT_Recipe Recipe, boolean is_input) {
+
+ if (FluidArray.length > x_dir_max_fluids * y_max_dir_max_fluids) {
+ GT_Log.err.println("Recipe cannot be properly displayed in NEI due to too many fluids.");
+ }
+
+ // 18 pixels to get to a new grid for placing a fluid tile since they are 16x16 and have 1 pixel buffers around them.
+ int x_max = x_coord_origin + x_dir_max_fluids * 18;
- int x_max = x_coord + 4 * 18;
+ // Temp variables to keep track of current coords to place fluid at.
+ int x_coord = x_coord_origin;
+ int y_coord = y_coord_origin;
- for(FluidStack fluid : aRecipe.mFluidInputs) {
- this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord));
+ // Iterate over all fluids in array and display them.
+ for(FluidStack fluid : FluidArray) {
+ if (fluid != GT_Values.NF) {
+ if (is_input) {
+ this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, true));
+ } else {
+ this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord, GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput));
+ }
x_coord += 18;
if (x_coord == x_max) {
- x_coord = 3;
+ x_coord = x_coord_origin;
y_coord += 18;
}
}
+ }
+
+ }
+
+ public CachedDefaultRecipe(GT_Recipe aRecipe) {
+ super();
+ this.mRecipe = aRecipe;
+ List<PositionedStack> maybeIn;
+ List<PositionedStack> maybeOut;
+ mOutputs = new ArrayList<>();
+ mInputs = new ArrayList<>();
+
+ if (GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes == GT_NEI_DefaultHandler.this.mRecipeMap) {
+ // Special handler for complex fusion NEI display.
+ // Generates a 4x4 grid of fluid icons if it's a complex fusion recipe.
+ drawNEIFluidGrid(aRecipe.mFluidInputs, 3, -1, 4, 4, aRecipe, true);
+ drawNEIFluidGrid(aRecipe.mFluidOutputs, 93, -1, 4, 4, aRecipe, false);
+ } else if (GT_Recipe.GT_Recipe_Map.sPlasmaForgeRecipes == GT_NEI_DefaultHandler.this.mRecipeMap) {
+ // Special handeler for plasma forge NEI display.
+ // Generates a 3x3 grid of fluid icons if it's a plasma forge recipe.
+ drawNEIItemAndFluidGrid(aRecipe.mInputs, aRecipe.mFluidInputs, 12, 5, 3, 2, aRecipe, true);
+ drawNEIItemAndFluidGrid(aRecipe.mOutputs, aRecipe.mFluidOutputs, 102, 5, 3, 2, aRecipe, false);
+// drawNEIFluidGrid(aRecipe.mFluidInputs, 1, 1, 3, 3, aRecipe, true);
+// drawNEIFluidGrid(aRecipe.mFluidOutputs, 102, 5, 3, 3, aRecipe, false);
+ } else if (GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes == GT_NEI_DefaultHandler.this.mRecipeMap) {
+ // Special handler for LCR.
+ drawNEIItemAndFluidGrid(aRecipe.mInputs, aRecipe.mFluidInputs, 12, 5, 3, 2, aRecipe, true);
+ drawNEIItemAndFluidGrid(aRecipe.mOutputs, aRecipe.mFluidOutputs, 102, 5, 3, 2, aRecipe, false);
} else {
+ // Default GT NEI handler for drawing fluids/items on screen.
+ switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) {
+ case 0:
+ break;
+ case 1: // 1x1
+ drawNEIItemGrid(aRecipe.mInputs, 48, 14, 1, 1, aRecipe, true);
+ break;
+ case 2: // 2x1
+ drawNEIItemGrid(aRecipe.mInputs, 30, 14, 2, 1, aRecipe, true);
+ break;
+ case 3: //
+ drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 1, aRecipe, true);
+ break;
+ case 4:
+ drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 2, aRecipe, true);
+ break;
+ case 5:
+ drawNEIItemGrid(aRecipe.mInputs, 12, 14, 3, 2, aRecipe, true);
+ break;
+ case 6:
+ drawNEIItemGrid(aRecipe.mInputs, 12, -4, 3, 2, aRecipe, true);
+ break;
+ default:
+ drawNEIItemGrid(aRecipe.mInputs, 12, -4, 3, 3, aRecipe, true);
+ }
+ switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualOutputCount) {
+ case 0:
+ break;
+ case 1:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 14, 1, 1, aRecipe, false);
+ break;
+ case 2:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 14, 2, 1, aRecipe, false);
+ break;
+ case 3:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 14, 3, 1, aRecipe, false);
+ break;
+ case 4:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 2, 2, aRecipe, false);
+ break;
+ case 5:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 3, 2, aRecipe, false);
+ break;
+ case 6:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, 5, 3, 2, aRecipe, false);
+ break;
+ default:
+ drawNEIItemGrid(aRecipe.mOutputs, 102, -4, 3, 3, aRecipe, false);
+ }
+
+ // ??? No idea what this does. Leaving it alone.
+ if (aRecipe.mSpecialItems != null) {
+ this.mInputs.add(new FixedPositionedStack(aRecipe.mSpecialItems, 120, 52));
+ }
+
if ((aRecipe.mFluidInputs.length > 0) && (aRecipe.mFluidInputs[0] != null) && (aRecipe.mFluidInputs[0].getFluid() != null)) {
this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[0], true), 48, 52));
if ((aRecipe.mFluidInputs.length > 1) && (aRecipe.mFluidInputs[1] != null) && (aRecipe.mFluidInputs[1].getFluid() != null)) {
this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidInputs[1], true), 30, 52));
}
}
- }
-
- if (GT_Recipe.GT_Recipe_Map.sComplexFusionRecipes == GT_NEI_DefaultHandler.this.mRecipeMap) {
- int x_coord = 93;
- int y_coord = -1;
-
- int x_max = x_coord + 4 * 18;
-
- for(FluidStack fluid : aRecipe.mFluidOutputs) {
- this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(fluid, true), x_coord, y_coord));
- x_coord += 18;
- if (x_coord == x_max) {
- x_coord = 93;
- y_coord += 18;
- }
- }
- } else {
if (aRecipe.mFluidOutputs.length > 1) {
if (aRecipe.mFluidOutputs[0] != null && (aRecipe.mFluidOutputs[0].getFluid() != null)) {
this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(aRecipe.mFluidOutputs[0], true), 120, 5));