当前位置: 首页>>代码示例>>Java>>正文


Java NEIClientConfig.getKeyBinding方法代码示例

本文整理汇总了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;
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:17,代码来源:NEIPing.java

示例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);
}
 
开发者ID:StrayWolfe,项目名称:Cooking-with-TFC,代码行数:17,代码来源:CookingPotRecipeHandler.java

示例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;
}
 
开发者ID:ElConquistador,项目名称:WikiLink,代码行数:20,代码来源:WikiLinkInputHandler.java

示例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;
}
 
开发者ID:GWYOG,项目名称:CustomNEIPlugins,代码行数:13,代码来源:PluginMachineRecipe.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:TemplateRecipeHandler.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:TemplateRecipeHandler.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:16,代码来源:RecipeItemInputHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:40,代码来源:SolarNeutronRecipeHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:40,代码来源:SolarEvaporationRecipeHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:36,代码来源:ChemicalCrystallizerRecipeHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:32,代码来源:ChemicalOxidizerRecipeHandler.java

示例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);
}
 
开发者ID:Tonius,项目名称:NEI-Integration,代码行数:14,代码来源:RecipeHandlerBase.java

示例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);
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:15,代码来源:BarrelRecipeHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:62,代码来源:ElectrolyticSeparatorRecipeHandler.java

示例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);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:63,代码来源:PRCRecipeHandler.java


注:本文中的codechicken.nei.NEIClientConfig.getKeyBinding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。