本文整理汇总了Java中codechicken.nei.NEIClientConfig.getKeyBinding方法的典型用法代码示例。如果您正苦于以下问题:Java NEIClientConfig.getKeyBinding方法的具体用法?Java NEIClientConfig.getKeyBinding怎么用?Java NEIClientConfig.getKeyBinding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.nei.NEIClientConfig
的用法示例。
在下文中一共展示了NEIClientConfig.getKeyBinding方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
public boolean keyTyped(final GuiContainer guiContainer, final char c, final int i) {
final int keyBinding = NEIClientConfig.getKeyBinding("gui.xu_ping");
if (i != keyBinding) {
return false;
}
final LayoutManager layout = LayoutManager.instance();
if (layout == null || LayoutManager.itemPanel == null || NEIClientConfig.isHidden()) {
return false;
}
final ItemStack stackMouseOver = GuiContainerManager.getStackMouseOver(guiContainer);
if (stackMouseOver == null || stackMouseOver.getItem() == null) {
return false;
}
NetworkHandler.sendPacketToServer(new PacketNEIPing(stackMouseOver));
return true;
}
示例2: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if (transferFluid(gui, recipe, false))
return true;
}
else if (keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if (transferFluid(gui, recipe, true))
return true;
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例3: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
public boolean keyTyped(GuiContainer gui, char keyChar, int keyCode)
{
if (keyCode == NEIClientConfig.getKeyBinding("wiki"))
{
GuiContainerManager manager = GuiContainerManager.getManager(gui);
if(manager.getStackMouseOver() != null)
{
WikiLink.LogHelper.fine("WikiLink is connecting to online sources.");
long start = System.currentTimeMillis();
FMLClientHandler.instance().getClient().displayGuiScreen(new GuiContainerMenu(manager.getStackMouseOver()));
WikiLink.LogHelper.fine(String.format("WikiLink has connected to the Feed the Beast wiki, taking a total of %s milliseconds! :)", System.currentTimeMillis() - start));
WikiLink.LogHelper.fine("Note, if you are concerned with this connection speed, please do not contact the author of the mod. This problem can be fixed with a faster internet connection.");
}
}
return false;
}
示例4: lastKeyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@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;
}
示例5: lastKeyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@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;
}
示例6: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@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;
}
示例7: lastKeyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@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;
}
示例8: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
GasStack gas = null;
if(xAxis >= 26 && xAxis <= 42 && yAxis >= 14+4 && yAxis <= 72+4)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).inputStack;
}
else if(xAxis >= 134 && xAxis <= 150 && yAxis >= 14+4 && yAxis <= 72+4)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).outputStack;
}
if(gas != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doGasLookup(gas, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doGasLookup(gas, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例9: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
FluidStack stack = null;
if(xAxis >= 7 && xAxis <= 23 && yAxis >= 14+4 && yAxis <= 72+4)
{
stack = ((CachedIORecipe)arecipes.get(recipe)).fluidInput;
}
else if(xAxis >= 153 && xAxis <= 169 && yAxis >= 14+4 && yAxis <= 72+4)
{
stack = ((CachedIORecipe)arecipes.get(recipe)).fluidOutput;
}
if(stack != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doFluidLookup(stack, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doFluidLookup(stack, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例10: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
GasStack stack = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 5+13 && yAxis <= 63+13)
{
stack = ((CachedIORecipe)arecipes.get(recipe)).inputStack;
}
if(stack != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doGasLookup(stack, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doGasLookup(stack, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例11: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
Point offset = gui.getRecipePosition(recipe);
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft)-offset.x;
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop)-offset.y;
if(xAxis >= 134-5 && xAxis <= 150-5 && yAxis >= 14-11 && yAxis <= 72-11)
{
GasStack stack = ((CachedIORecipe)arecipes.get(recipe)).outputStack;
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doGasLookup(stack, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doGasLookup(stack, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例12: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@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);
}
示例13: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if (transferFluid(gui, recipe, false)) return true;
}
else if (keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if (transferFluid(gui, recipe, true)) return true;
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例14: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
GasStack gas = null;
FluidStack fluid = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11+7 && yAxis <= 69+7)
{
fluid = ((CachedIORecipe)arecipes.get(recipe)).fluidInput.ingredient;
}
else if(xAxis >= 59 && xAxis <= 75 && yAxis >= 19+7 && yAxis <= 47+7)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).outputPair.leftGas;
}
else if(xAxis >= 101 && xAxis <= 117 && yAxis >= 19+7 && yAxis <= 47+7)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).outputPair.rightGas;
}
if(gas != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doGasLookup(gas, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doGasLookup(gas, true))
{
return true;
}
}
}
else if(fluid != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doFluidLookup(fluid, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doFluidLookup(fluid, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}
示例15: keyTyped
import codechicken.nei.NEIClientConfig; //导入方法依赖的package包/类
@Override
public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe)
{
Point point = GuiDraw.getMousePosition();
Point offset = gui.getRecipePosition(recipe);
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft)-offset.x;
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop)-offset.y;
GasStack gas = null;
FluidStack fluid = null;
if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
fluid = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.getInput().getFluid();
}
else if(xAxis >= 29-5 && xAxis <= 45-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.getInput().getGas();
}
else if(xAxis >= 141-5 && xAxis <= 157-5 && yAxis >= 41-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.getOutput().getGasOutput();
}
if(gas != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doGasLookup(gas, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doGasLookup(gas, true))
{
return true;
}
}
}
else if(fluid != null)
{
if(keyCode == NEIClientConfig.getKeyBinding("gui.recipe"))
{
if(doFluidLookup(fluid, false))
{
return true;
}
}
else if(keyCode == NEIClientConfig.getKeyBinding("gui.usage"))
{
if(doFluidLookup(fluid, true))
{
return true;
}
}
}
return super.keyTyped(gui, keyChar, keyCode, recipe);
}