Java Code Examples for codechicken.nei.NEIClientConfig#getKeyBinding()
The following examples show how to use
codechicken.nei.NEIClientConfig#getKeyBinding() .
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: TemplateRecipeHandler.java From NotEnoughItems with MIT License | 5 votes |
@Override public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode) { if (!canHandle(gui)) return false; if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) return transferRect(gui, false); else if (keyCode == NEIClientConfig.getKeyBinding("gui.usage")) return transferRect(gui, true); return false; }
Example 2
Source File: TemplateRecipeHandler.java From NotEnoughItems with MIT License | 5 votes |
@Override public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) { if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) return transferRect(gui, recipe, false); else if (keyCode == NEIClientConfig.getKeyBinding("gui.usage")) return transferRect(gui, recipe, true); return false; }
Example 3
Source File: RecipeItemInputHandler.java From NotEnoughItems with MIT License | 5 votes |
@Override public boolean lastKeyTyped(GuiContainer gui, char keyChar, int keyCode) { ItemStack stackover = GuiContainerManager.getStackMouseOver(gui); if(stackover == null) return false; if(keyCode == NEIClientConfig.getKeyBinding("gui.usage") || (keyCode == NEIClientConfig.getKeyBinding("gui.recipe") && NEIClientUtils.shiftKey())) return GuiUsageRecipe.openRecipeGui("item", stackover.copy()); if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) return GuiCraftingRecipe.openRecipeGui("item", stackover.copy()); return false; }
Example 4
Source File: RecipeHandlerBase.java From NEI-Integration with MIT License | 5 votes |
@Override public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) { if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) { if (this.transferFluidTank(gui, recipe, false)) { return true; } } else if (keyCode == NEIClientConfig.getKeyBinding("gui.usage")) { if (this.transferFluidTank(gui, recipe, true)) { return true; } } return super.keyTyped(gui, keyChar, keyCode, recipe); }