diff options
Diffstat (limited to 'src/main/java/gregtech/nei')
| -rw-r--r-- | src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java | 33 | ||||
| -rw-r--r-- | src/main/java/gregtech/nei/NEI_GT_Config.java | 3 |
2 files changed, 21 insertions, 15 deletions
diff --git a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java index 6edda76f23..227ce05d85 100644 --- a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java @@ -58,7 +58,8 @@ public class GT_NEI_AssLineHandler } public TemplateRecipeHandler newInstance() { - return new GT_NEI_AssLineHandler(this.mRecipeMap); + NEI_GT_Config.ALH=new GT_NEI_AssLineHandler(this.mRecipeMap); + return NEI_GT_Config.ALH; } public void loadCraftingRecipes(String outputId, Object... results) { @@ -73,6 +74,10 @@ public class GT_NEI_AssLineHandler } } + public void clearRecipes(){ + this.arecipes.clear(); + } + public void loadCraftingRecipes(ItemStack aResult) { ItemData tPrefixMaterial = GT_OreDictUnificator.getAssociation(aResult); @@ -215,14 +220,14 @@ public class GT_NEI_AssLineHandler public static class GT_RectHandler implements IContainerInputHandler, IContainerTooltipHandler { public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) { - if (canHandle(gui)) { - if (button == 0) { - return transferRect(gui, false); - } - if (button == 1) { - return transferRect(gui, true); - } - } + //if (canHandle(gui)) { + // if (button == 0) { + // return transferRect(gui, false); + // } + // if (button == 1) { + // return transferRect(gui, true); + // } + //} return false; } @@ -236,11 +241,11 @@ public class GT_NEI_AssLineHandler } public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) { - if ((canHandle(gui)) && (currenttip.isEmpty())) { - if (new Rectangle(138, 18, 18, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { - currenttip.add("Recipes"); - } - } + //if ((canHandle(gui)) && (currenttip.isEmpty())) { + // if (new Rectangle(138, 18, 18, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine) gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine) gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) { + // currenttip.add("Recipes"); + // } + //} return currenttip; } diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index ac496b4d4f..4f72d40608 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -8,6 +8,7 @@ import gregtech.api.util.GT_Utility; public class NEI_GT_Config implements IConfigureNEI { public static boolean sIsAdded = true; + public static GT_NEI_AssLineHandler ALH; public void loadConfig() { sIsAdded = false; @@ -17,7 +18,7 @@ public class NEI_GT_Config } } if(FMLCommonHandler.instance().getEffectiveSide().isClient()) - new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes); + ALH=new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineFakeRecipes); sIsAdded = true; } |
