codechicken.nei.recipe.GuiCraftingRecipe Java Examples
The following examples show how to use
codechicken.nei.recipe.GuiCraftingRecipe.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ItemPanel.java From NotEnoughItems with MIT License | 6 votes |
@Override public void mouseUp(int mousex, int mousey, int button) { ItemPanelSlot hoverSlot = getSlotMouseOver(mousex, mousey); if (hoverSlot != null && hoverSlot.slotIndex == mouseDownSlot && draggedStack == null) { ItemStack item = hoverSlot.item; if (NEIController.manager.window instanceof GuiRecipe || !NEIClientConfig.canCheatItem(item)) { if (button == 0) GuiCraftingRecipe.openRecipeGui("item", item); else if (button == 1) GuiUsageRecipe.openRecipeGui("item", item); draggedStack = null; mouseDownSlot = -1; return; } NEIClientUtils.cheatItem(item, button, -1); } mouseDownSlot = -1; }
Example #2
Source File: BW_NEI_BioVatHandler.java From bartworks with MIT License | 5 votes |
public BW_NEI_BioVatHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) { super(aRecipeMap); this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier())); if (!NEI_BW_Config.sIsAdded) { FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(this); GuiUsageRecipe.usagehandlers.add(this); } }
Example #3
Source File: BW_NEI_BioLabHandler.java From bartworks with MIT License | 5 votes |
public BW_NEI_BioLabHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) { super(aRecipeMap); this.transferRects.add(new TemplateRecipeHandler.RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getOverlayIdentifier())); if (!NEI_BW_Config.sIsAdded) { FMLInterModComms.sendRuntimeMessage(GT_Values.GT, "NEIPlugins", "register-crafting-handler", "gregtech@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(this); GuiUsageRecipe.usagehandlers.add(this); } }
Example #4
Source File: BW_NEI_OreHandler.java From bartworks with MIT License | 5 votes |
public BW_NEI_OreHandler() { if (!NEI_BW_Config.sIsAdded) { FMLInterModComms.sendRuntimeMessage(MainMod.MOD_ID, "NEIPlugins", "register-crafting-handler", MainMod.MOD_ID + "@" + this.getRecipeName() + "@" + this.getOverlayIdentifier()); GuiCraftingRecipe.craftinghandlers.add(this); // GuiUsageRecipe.usagehandlers.add(this); } }
Example #5
Source File: PositionedFluidTank.java From NEI-Integration with MIT License | 5 votes |
public boolean transfer(boolean usage) { if (this.tank.getFluid() != null && this.tank.getFluid().amount > 0) { if (usage) { if (!GuiUsageRecipe.openRecipeGui("liquid", new Object[] { this.tank.getFluid() })) { return false; } } else { if (!GuiCraftingRecipe.openRecipeGui("liquid", new Object[] { this.tank.getFluid() })) { return false; } } return true; } return false; }
Example #6
Source File: RecipeHandlerDumper.java From NEI-Integration with MIT License | 5 votes |
@Override public Iterable<String[]> dump(int mode) { List<String[]> list = new LinkedList<String[]>(); for (ICraftingHandler crafting : GuiCraftingRecipe.craftinghandlers) { list.add(new String[] { crafting.getClass().getName(), "crafting" }); } for (IUsageHandler usage : GuiUsageRecipe.usagehandlers) { list.add(new String[] { usage.getClass().getName(), "usage" }); } return list; }