diff options
Diffstat (limited to 'src/Java/gtPlusPlus/nei')
-rw-r--r-- | src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java | 25 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java | 11 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java | 21 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java | 3 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/nei/NEI_GT_Config.java | 7 |
5 files changed, 44 insertions, 23 deletions
diff --git a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java index 832ef780e0..de2c29db9f 100644 --- a/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java +++ b/src/Java/gtPlusPlus/nei/GTPP_NEI_DefaultHandler.java @@ -31,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.Logger; import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.util.math.MathUtils; import net.minecraft.client.Minecraft; @@ -884,11 +885,13 @@ public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler { aInputItemsCount = 9; } for (int i=0;i<aInputItemsCount;i++) { - int x = mInputSlotMap.get(aSlotToCheck).getKey(); - int y = mInputSlotMap.get(aSlotToCheck).getValue(); - this.mInputs.add(new FixedPositionedStack(mRecipe.getRepresentativeInput(aSlotToCheck), x, y)); - aSlotToCheck++; - aInputSlotsUsed++; + int x = mInputSlotMap.get(aInputSlotsUsed).getKey(); + int y = mInputSlotMap.get(aInputSlotsUsed).getValue(); + ItemStack aRepStack = mRecipe.getRepresentativeInput(aSlotToCheck++); + if (aRepStack != null) { + this.mInputs.add(new FixedPositionedStack(aRepStack, x, y)); + aInputSlotsUsed++; + } } } aSlotToCheck = 0; @@ -898,11 +901,13 @@ public class GTPP_NEI_DefaultHandler extends TemplateRecipeHandler { aOutputItemsCount = 9; } for (int i=0;i<aOutputItemsCount;i++) { - int x = mOutputSlotMap.get(aSlotToCheck).getKey(); - int y = mOutputSlotMap.get(aSlotToCheck).getValue(); - this.mOutputs.add(new FixedPositionedStack(mRecipe.getOutput(aSlotToCheck), x, y, mRecipe.getOutputChance(aSlotToCheck))); - aSlotToCheck++; - aOutputSlotsUsed++; + int x = mOutputSlotMap.get(aOutputSlotsUsed).getKey(); + int y = mOutputSlotMap.get(aOutputSlotsUsed).getValue(); + ItemStack aRepStack = mRecipe.getOutput(aSlotToCheck++); + if (aRepStack != null) { + this.mOutputs.add(new FixedPositionedStack(aRepStack, x, y, mRecipe.getOutputChance(aSlotToCheck))); + aOutputSlotsUsed++; + } } } diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java index 9fbc689ac3..dd7338eccd 100644 --- a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java +++ b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR.java @@ -1,10 +1,12 @@ package gtPlusPlus.nei; +import org.lwjgl.opengl.GL11; + +import codechicken.lib.gui.GuiDraw; 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; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.math.MathUtils; public class GT_NEI_LFTR extends GTPP_NEI_DefaultHandler { @@ -22,6 +24,13 @@ public class GT_NEI_LFTR extends GTPP_NEI_DefaultHandler { public CachedDefaultRecipe createCachedRecipe(GT_Recipe aRecipe) { return new LFTRDefaultRecipe(aRecipe); } + + @Override + public void drawBackground(final int recipe) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GuiDraw.changeTexture(this.getGuiTexture()); + GuiDraw.drawTexturedModalRect(-4, -8, 1, 3, 174, 89); + } @Override public void drawExtras(final int aRecipeIndex) { diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java index b293ac7c6f..c9f9f0722a 100644 --- a/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java +++ b/src/Java/gtPlusPlus/nei/GT_NEI_LFTR_Sparging.java @@ -11,8 +11,12 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; import codechicken.nei.PositionedStack; +import codechicken.nei.recipe.GuiCraftingRecipe; import codechicken.nei.recipe.GuiRecipe; +import codechicken.nei.recipe.GuiUsageRecipe; import codechicken.nei.recipe.TemplateRecipeHandler; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.ItemData; @@ -20,10 +24,8 @@ import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gregtech.api.util.GasSpargingRecipe; import gregtech.api.util.GasSpargingRecipeMap; -import gtPlusPlus.core.gui.machine.GUI_DecayablesChest; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; -import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -33,6 +35,15 @@ public class GT_NEI_LFTR_Sparging extends TemplateRecipeHandler { public static final String mNEIName = GasSpargingRecipeMap.mNEIDisplayName; private SoftReference<List<GasSpargingRecipeNEI>> mCachedRecipes = null; + public GT_NEI_LFTR_Sparging() { + this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier(), new Object[0])); + if (!NEI_GT_Config.sIsAdded) { + FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtechplusplus@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); + GuiCraftingRecipe.craftinghandlers.add(this); + GuiUsageRecipe.usagehandlers.add(this); + } + } + public String getRecipeName() { return mNEIName; } @@ -41,12 +52,8 @@ public class GT_NEI_LFTR_Sparging extends TemplateRecipeHandler { return GasSpargingRecipeMap.mNEIGUIPath; } - public Class<? extends GuiContainer> getGuiClass() { - return GUI_DecayablesChest.class; - } - public String getOverlayIdentifier() { - return "GTPP_Sparging"; + return gregtech.api.util.GasSpargingRecipeMap.mUnlocalizedName; } public int recipiesPerPage() { diff --git a/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java b/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java index 448cb69dad..f4f69589b6 100644 --- a/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java +++ b/src/Java/gtPlusPlus/nei/GT_NEI_MultiNoCell.java @@ -7,9 +7,8 @@ import org.lwjgl.opengl.GL11; import codechicken.lib.gui.GuiDraw; import codechicken.nei.recipe.TemplateRecipeHandler; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Utility; -import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; import gtPlusPlus.core.util.math.MathUtils; public class GT_NEI_MultiNoCell extends GTPP_NEI_DefaultHandler { diff --git a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java index b28cc933ae..0b3cf8e66e 100644 --- a/src/Java/gtPlusPlus/nei/NEI_GT_Config.java +++ b/src/Java/gtPlusPlus/nei/NEI_GT_Config.java @@ -31,7 +31,7 @@ implements IConfigureNEI { mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockCentrifugeRecipes_GT.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT.mUnlocalizedName); mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mUnlocalizedName); - mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sSpargeTowerRecipes.mUnlocalizedName); + mUniqueRecipeMapHandling.add(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mUnlocalizedName); // Standard GT Recipe Maps Logger.INFO("NEI Registration: "+GTPP_Recipe_Map_Internal.sMappingsEx.size()+" sMappingEx"); @@ -70,14 +70,15 @@ implements IConfigureNEI { new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockElectrolyzerRecipes_GT); Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sMultiblockMixerRecipes_GT.mNEIName); new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sMultiblockMixerRecipes_GT); + Logger.INFO("NEI Registration: Registering NEI handler for "+GTPP_Recipe_Map.sAlloyBlastSmelterRecipes.mNEIName); + new GT_NEI_MultiNoCell(GTPP_Recipe_Map.sAlloyBlastSmelterRecipes); Logger.INFO("NEI Registration: Registering NEI handler for "+DecayableRecipeHandler.mNEIName); API.registerRecipeHandler(new DecayableRecipeHandler()); API.registerUsageHandler(new DecayableRecipeHandler()); Logger.INFO("NEI Registration: Registering NEI handler for "+GT_NEI_LFTR_Sparging.mNEIName); - API.registerRecipeHandler(new GT_NEI_LFTR_Sparging()); - API.registerUsageHandler(new GT_NEI_LFTR_Sparging()); + new GT_NEI_LFTR_Sparging(); // Hide Flasks if (Utils.isClient()) { |