From 43e67b5f97543c2a1ea51b89ed745d0773f94751 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Tue, 7 Dec 2021 14:37:22 +0000 Subject: Added more nuclear processing recipes. Removed lots of useless nuclear generated items. More NEI improvements. Made Dehydrator and FFPP recipe handling more lenient. --- .../gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java | 109 ++++++++++++++- src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java | 59 ++++++++ src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java | 152 --------------------- src/Java/gtPlusPlus/nei/GT_NEI_VacFurnace.java | 119 ---------------- .../nei/GT_NEI_multiCentriElectroFreezer.java | 150 -------------------- src/Java/gtPlusPlus/nei/NEI_GT_Config.java | 61 +++------ 6 files changed, 188 insertions(+), 462 deletions(-) create mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_VacFurnace.java delete mode 100644 src/Java/gtPlusPlus/nei/GT_NEI_multiCentriElectroFreezer.java (limited to 'src/Java/gtPlusPlus/nei') diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java index dd27a19528..832ef780e0 100644 --- a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java +++ b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java @@ -5,6 +5,7 @@ import java.awt.Rectangle; import java.lang.ref.SoftReference; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; @@ -30,6 +31,7 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.util.math.MathUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; @@ -37,16 +39,35 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -public class GTPP_NEI_DefaultHandler -extends TemplateRecipeHandler { +public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler { public static final int sOffsetX = 5; public static final int sOffsetY = 11; private SoftReference> mCachedRecipes = null; + + private static final HashMap> mInputSlotMap = new HashMap>(); + private static final HashMap> mOutputSlotMap = new HashMap>(); static { GuiContainerManager.addInputHandler(new GT_RectHandler()); GuiContainerManager.addTooltipHandler(new GT_RectHandler()); + int[] aSlotX = new int[] {12, 30, 48}; + int[] aSlotY = new int[] {5, 23, 41, 64}; + // Input slots + int aIndex = 0; + for (int y=0; y(aSlotX[x], aSlotY[y])); + } + } + // Output slots + aSlotX = new int[] {102, 120, 138}; + aIndex = 0; + for (int y=0; y(aSlotX[x], aSlotY[y])); + } + } } protected final GT_Recipe_Map mRecipeMap; @@ -829,4 +850,88 @@ extends TemplateRecipeHandler { return this.mOutputs; } } + + public class NoCellMultiDefaultRecipe extends CachedDefaultRecipe { + + public NoCellMultiDefaultRecipe(final GT_Recipe aRecipe) { + super(aRecipe); + + } + + @Override + public void handleSlots() { + + int aInputItemsCount = this.mRecipe.mInputs.length; + int aInputFluidsCount = this.mRecipe.mFluidInputs.length; + int aOutputItemsCount = this.mRecipe.mOutputs.length; + int aOutputFluidsCount = this.mRecipe.mFluidOutputs.length; + int aInputSlotsUsed = 0; + int aOutputSlotsUsed = 0; + int aSlotToCheck = 0; + + // Special Slot + if (mRecipe.mSpecialItems != null) { + this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); + } + + /* + * Items + */ + + // Upto 9 Inputs Slots + if (aInputItemsCount > 0) { + if (aInputItemsCount > 9) { + aInputItemsCount = 9; + } + for (int i=0;i 0) { + if (aOutputItemsCount > 9) { + aOutputItemsCount = 9; + } + for (int i=0;i 0) { + for (int i=0;i 0) { + for (int i=0;i 0) { + drawText(10, 110, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Integer.valueOf(tDuration / 20))) + " secs", -16777216); + } + if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) { + drawText(10, 120, this.mRecipeMap.mNEISpecialValuePre + MathUtils.formatNumbers((((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue * this.mRecipeMap.mNEISpecialValueMultiplier)) + this.mRecipeMap.mNEISpecialValuePost, -16777216); + } + } + +} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java b/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java deleted file mode 100644 index a4926f5d7e..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_RFPP.java +++ /dev/null @@ -1,152 +0,0 @@ -package gtPlusPlus.nei; - -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; - -public class GT_NEI_RFPP extends GTPP_NEI_DefaultHandler { - - public GT_NEI_RFPP() { - super(GTPP_Recipe_Map.sFissionFuelProcessing); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_RFPP(); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new FFPPDefaultRecipe(aRecipe); - } - - public class FFPPDefaultRecipe extends CachedDefaultRecipe { - - public FFPPDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - } - - @Override - public void handleSlots() { - int tStartIndex = 0; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - tStartIndex = 0; - - //Four Output Slots - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 5, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 102, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 120, 23, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - - //New fluid display behaviour when 3 fluid inputs are detected. (Basically a mix of the code below for outputs an the code above for 9 input slots.) - if (mRecipe.mFluidInputs.length > 2) { - if ((mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 12, 5)); - } - if ((mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 5)); - } - if ((mRecipe.mFluidInputs.length > 2) && (mRecipe.mFluidInputs[2] != null) && (mRecipe.mFluidInputs[2].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[2], true), 48, 5)); - } - if ((mRecipe.mFluidInputs.length > 3) && (mRecipe.mFluidInputs[3] != null) && (mRecipe.mFluidInputs[3].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[3], true), 12, 23)); - } - if ((mRecipe.mFluidInputs.length > 4) && (mRecipe.mFluidInputs[4] != null) && (mRecipe.mFluidInputs[4].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[4], true), 30, 23)); - } - if ((mRecipe.mFluidInputs.length > 5) && (mRecipe.mFluidInputs[5] != null) && (mRecipe.mFluidInputs[5].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[5], true), 48, 23)); - } - if ((mRecipe.mFluidInputs.length > 6) && (mRecipe.mFluidInputs[6] != null) && (mRecipe.mFluidInputs[6].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[6], true), 12, 41)); - } - if ((mRecipe.mFluidInputs.length > 7) && (mRecipe.mFluidInputs[7] != null) && (mRecipe.mFluidInputs[7].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[7], true), 30, 41)); - } - if ((mRecipe.mFluidInputs.length > 8) && (mRecipe.mFluidInputs[8] != null) && (mRecipe.mFluidInputs[8].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[8], true), 48, 41)); - } - } - //Returns to old behaviour if fluid inputs < 3 - else if ((mRecipe.mFluidInputs.length > 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 48, 52)); - if ((mRecipe.mFluidInputs.length == 2) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 52)); - } - } - - if (mRecipe.mFluidOutputs.length > 1) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 5)); - } - if ((mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 120, 5)); - } - if ((mRecipe.mFluidOutputs.length > 2) && (mRecipe.mFluidOutputs[2] != null) && (mRecipe.mFluidOutputs[2].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[2], true), 138, 5)); - } - if ((mRecipe.mFluidOutputs.length > 3) && (mRecipe.mFluidOutputs[3] != null) && (mRecipe.mFluidOutputs[3].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[3], true), 102, 23)); - } - if ((mRecipe.mFluidOutputs.length > 4) && (mRecipe.mFluidOutputs[4] != null) && (mRecipe.mFluidOutputs[4].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[4], true), 120, 23)); - } - if ((mRecipe.mFluidOutputs.length > 5) && (mRecipe.mFluidOutputs[5] != null) && (mRecipe.mFluidOutputs[5].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[5], true), 138, 23)); - } - if ((mRecipe.mFluidOutputs.length > 6) && (mRecipe.mFluidOutputs[6] != null) && (mRecipe.mFluidOutputs[6].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[6], true), 102, 41)); - } - if ((mRecipe.mFluidOutputs.length > 7) && (mRecipe.mFluidOutputs[7] != null) && (mRecipe.mFluidOutputs[7].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[7], true), 120, 41)); - } - if ((mRecipe.mFluidOutputs.length > 8) && (mRecipe.mFluidOutputs[8] != null) && (mRecipe.mFluidOutputs[8].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[8], true), 138, 41)); - } - } else if ((mRecipe.mFluidOutputs.length > 0) && (mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 102, 5)); - } - } - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_VacFurnace.java b/src/Java/gtPlusPlus/nei/GT_NEI_VacFurnace.java deleted file mode 100644 index 5fe63c4c61..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_VacFurnace.java +++ /dev/null @@ -1,119 +0,0 @@ -package gtPlusPlus.nei; - -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; - -public class GT_NEI_VacFurnace extends GTPP_NEI_DefaultHandler { - - public GT_NEI_VacFurnace() { - super(GTPP_Recipe_Map.sVacuumFurnaceRecipes); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_VacFurnace(); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new VacFurnaceDefaultRecipe(aRecipe); - } - - public class VacFurnaceDefaultRecipe extends CachedDefaultRecipe { - - public VacFurnaceDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - } - - @Override - public void handleSlots() { - int tStartIndex = 0; - - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 5)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 12, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 30, 23)); - } - tStartIndex++; - if (mRecipe.getRepresentativeInput(tStartIndex) != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(tStartIndex), 48, 23)); - } - tStartIndex++; - - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - tStartIndex = 0; - - //9 Output Slots - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 101, 4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 119, 4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 137, 4, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 101, 22, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 119, 22, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 137, 22, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 101, 40, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 119, 40, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - if (mRecipe.getOutput(tStartIndex) != null) { - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(tStartIndex), 137, 40, mRecipe.getOutputChance(tStartIndex))); - } - tStartIndex++; - - if ((mRecipe.mFluidInputs.length > 0) && (mRecipe.mFluidInputs[0] != null) && (mRecipe.mFluidInputs[0].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[0], true), 12, 60)); - if ((mRecipe.mFluidInputs.length > 1) && (mRecipe.mFluidInputs[1] != null) && (mRecipe.mFluidInputs[1].getFluid() != null)) { - this.mInputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidInputs[1], true), 30, 60)); - } - } - - if (mRecipe.mFluidOutputs.length > 0) { - if ((mRecipe.mFluidOutputs[0] != null) && (mRecipe.mFluidOutputs[0].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[0], true), 101, 60)); - } - if ((mRecipe.mFluidOutputs.length > 1) && (mRecipe.mFluidOutputs[1] != null) && (mRecipe.mFluidOutputs[1].getFluid() != null)) { - this.mOutputs.add(new FixedPositionedStack(GT_Utility.getFluidDisplayStack(mRecipe.mFluidOutputs[1], true), 119, 60)); - } - } - } - } -} diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_multiCentriElectroFreezer.java b/src/Java/gtPlusPlus/nei/GT_NEI_multiCentriElectroFreezer.java deleted file mode 100644 index 3f22b15f3b..0000000000 --- a/src/Java/gtPlusPlus/nei/GT_NEI_multiCentriElectroFreezer.java +++ /dev/null @@ -1,150 +0,0 @@ -package gtPlusPlus.nei; - -import java.util.HashMap; - -import codechicken.nei.recipe.TemplateRecipeHandler; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import gtPlusPlus.api.objects.data.Pair; - -public class GT_NEI_multiCentriElectroFreezer extends GTPP_NEI_DefaultHandler { - - public GT_NEI_multiCentriElectroFreezer(GT_Recipe_Map aMap) { - super(aMap); - } - - @Override - public TemplateRecipeHandler newInstance() { - return new GT_NEI_multiCentriElectroFreezer(mRecipeMap); - } - - @Override - public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { - return new NoCellMultiDefaultRecipe(aRecipe); - } - - private static final HashMap> mInputSlotMap = new HashMap>(); - private static final HashMap> mOutputSlotMap = new HashMap>(); - - static { - int aSlotX_1 = 12; - int aSlotX_2 = 30; - int aSlotX_3 = 48; - int aSlotY_1 = 5; - int aSlotY_2 = 23; - int aSlotY_3 = 41; - int aSlotY_10 = 65; // Only if 9 input items and a FLuid - mInputSlotMap.put(0, new Pair(aSlotX_1, aSlotY_1)); - mInputSlotMap.put(1, new Pair(aSlotX_2, aSlotY_1)); - mInputSlotMap.put(2, new Pair(aSlotX_3, aSlotY_1)); - mInputSlotMap.put(3, new Pair(aSlotX_1, aSlotY_2)); - mInputSlotMap.put(4, new Pair(aSlotX_2, aSlotY_2)); - mInputSlotMap.put(5, new Pair(aSlotX_3, aSlotY_2)); - mInputSlotMap.put(6, new Pair(aSlotX_1, aSlotY_3)); - mInputSlotMap.put(7, new Pair(aSlotX_2, aSlotY_3)); - mInputSlotMap.put(8, new Pair(aSlotX_3, aSlotY_3)); - mInputSlotMap.put(9, new Pair(aSlotX_1, aSlotY_10)); - mInputSlotMap.put(10, new Pair(aSlotX_2, aSlotY_10)); - mInputSlotMap.put(11, new Pair(aSlotX_3, aSlotY_10)); - aSlotX_1 = 102; - aSlotX_2 = 120; - aSlotX_3 = 138; - mOutputSlotMap.put(0, new Pair(aSlotX_1, aSlotY_1)); - mOutputSlotMap.put(1, new Pair(aSlotX_2, aSlotY_1)); - mOutputSlotMap.put(2, new Pair(aSlotX_3, aSlotY_1)); - mOutputSlotMap.put(3, new Pair(aSlotX_1, aSlotY_2)); - mOutputSlotMap.put(4, new Pair(aSlotX_2, aSlotY_2)); - mOutputSlotMap.put(5, new Pair(aSlotX_3, aSlotY_2)); - mOutputSlotMap.put(6, new Pair(aSlotX_1, aSlotY_3)); - mOutputSlotMap.put(7, new Pair(aSlotX_2, aSlotY_3)); - mOutputSlotMap.put(8, new Pair(aSlotX_3, aSlotY_3)); - mOutputSlotMap.put(9, new Pair(aSlotX_1, aSlotY_10)); - mOutputSlotMap.put(10, new Pair(aSlotX_2, aSlotY_10)); - mOutputSlotMap.put(11, new Pair(aSlotX_3, aSlotY_10)); - } - - public class NoCellMultiDefaultRecipe extends CachedDefaultRecipe { - - public NoCellMultiDefaultRecipe(final GT_Recipe aRecipe) { - super(aRecipe); - - } - - @Override - public void handleSlots() { - - int aInputItemsCount = this.mRecipe.mInputs.length; - int aInputFluidsCount = this.mRecipe.mFluidInputs.length; - int aOutputItemsCount = this.mRecipe.mOutputs.length; - int aOutputFluidsCount = this.mRecipe.mFluidOutputs.length; - int aInputSlotsUsed = 0; - int aOutputSlotsUsed = 0; - int aSlotToCheck = 0; - - // Special Slot - if (mRecipe.mSpecialItems != null) { - this.mInputs.add(new FixedPositionedStack(mRecipe.mSpecialItems, 120, 52)); - } - - /* - * Items - */ - - // Upto 9 Inputs Slots - if (aInputItemsCount > 0) { - if (aInputItemsCount > 9) { - aInputItemsCount = 9; - } - for (int i=0;i 0) { - if (aOutputItemsCount > 9) { - aOutputItemsCount = 9; - } - for (int i=0;i 0) { - for (int i=0;i 0) { - for (int i=0;i