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


Java RecipeInfo类代码示例

本文整理汇总了Java中codechicken.nei.recipe.RecipeInfo的典型用法代码示例。如果您正苦于以下问题:Java RecipeInfo类的具体用法?Java RecipeInfo怎么用?Java RecipeInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RecipeInfo类属于codechicken.nei.recipe包,在下文中一共展示了RecipeInfo类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleTooltip

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
@Override
public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) {
    if (!canHandle(gui))
        return currenttip;

    if (GuiContainerManager.shouldShowTooltip(gui) && currenttip.size() == 0) {
        int[] offset = RecipeInfo.getGuiOffset(gui);
        try {
            Class clazzTemplateRecipeHandler = Class.forName("codechicken.nei.recipe.TemplateRecipeHandler");
            Method methodTransferRect = clazzTemplateRecipeHandler.getDeclaredMethod("transferRectTooltip", GuiContainer.class, Collection.class, int.class, int.class, List.class);
            methodTransferRect.setAccessible(true);
            currenttip = (List<String>) methodTransferRect.invoke(null, gui, getRecieTransferRect(gui), offset[0], offset[1], currenttip);
        } catch (Exception e) {}
    }
    return currenttip;
}
 
开发者ID:GWYOG,项目名称:CustomNEIPlugins,代码行数:17,代码来源:PluginMachineRecipe.java

示例2: transferRect

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
private boolean transferRect(GuiContainer gui, boolean usage) {
    int[] offset = RecipeInfo.getGuiOffset(gui);
    try {
        Class clazzTemplateRecipeHandler = Class.forName("codechicken.nei.recipe.TemplateRecipeHandler");
        Method methodTransferRect = clazzTemplateRecipeHandler.getDeclaredMethod("transferRect", GuiContainer.class, Collection.class, int.class, int.class, boolean.class);
        methodTransferRect.setAccessible(true);
        return (Boolean) methodTransferRect.invoke(null, gui, getRecieTransferRect(gui), offset[0], offset[1], usage);
    } catch (Exception e) {return false;}
}
 
开发者ID:GWYOG,项目名称:CustomNEIPlugins,代码行数:10,代码来源:PluginMachineRecipe.java

示例3: getOverlayHandler

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public IOverlayHandler getOverlayHandler(final GuiContainer gui, final int recipe) {
    IOverlayHandler handler = RecipeInfo.getOverlayHandler(gui, "microblocks");
    if (handler != null) {
        return handler;
    }
    if (this.isRecipe2x2(recipe)) {
        handler = RecipeInfo.getOverlayHandler(gui, "microblocks2x2");
        if (handler != null) {
            return handler;
        }
    }
    return super.getOverlayHandler(gui, recipe);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:14,代码来源:FMPMicroBlocksHandler.java

示例4: bootNEI

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public static void bootNEI(World world) {
    if (configLoaded)
        return;

    loadStates();
    //ItemVisibilityHash.loadStates();
    //vishash = new ItemVisibilityHash();
    ItemInfo.load(world);
    GuiInfo.load();
    RecipeInfo.load();
    LayoutManager.load();
    NEIController.load();

    configLoaded = true;

    ClassDiscoverer classDiscoverer = new ClassDiscoverer(new IStringMatcher()
    {
        public boolean matches(String test) {
            return test.startsWith("NEI") && test.endsWith("Config.class");
        }
    }, IConfigureNEI.class);

    classDiscoverer.findClasses();

    for (Class<?> clazz : classDiscoverer.classes) {
        try {
            IConfigureNEI config = (IConfigureNEI) clazz.newInstance();
            config.loadConfig();
            NEIModContainer.plugins.add(config);
            logger.debug("Loaded " + clazz.getName());
        } catch (Exception e) {
            logger.error("Failed to Load " + clazz.getName(), e);
        }
    }

    ItemSorter.loadConfig();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:38,代码来源:NEIClientConfig.java

示例5: init

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public static void init()
{
    AutoCrafter2000.getLogger().info("NEI compatibility init ...");
    try
    {
        if (FMLCommonHandler.instance().getSide().isClient()) RecipeInfo.registerOverlayHandler(AutoCrafterGui.class, new AutoCrafterOverlayHandler(), "crafting");
        AutoCrafter2000.getLogger().info("NEI compatibility done.");
    }
    catch (Exception e)
    {
        AutoCrafter2000.getLogger().warning("NEI compatibility FAILED.");
        e.fillInStackTrace();
    }
}
 
开发者ID:CCM-Modding,项目名称:AutoCrafter2000,代码行数:15,代码来源:NEIHelper.java

示例6: getOverlayRenderer

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
@Override
   public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
IRecipeOverlayRenderer renderer = super.getOverlayRenderer(gui, recipe);
if (renderer != null)
    return renderer;

IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, "crafting2x2");
if (positioner == null)
    return null;
return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
   }
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:12,代码来源:GemmerationTableRecipeHandler.java

示例7: getOverlayHandler

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
@Override
   public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe) {
IOverlayHandler handler = super.getOverlayHandler(gui, recipe);
if (handler != null)
    return handler;

return RecipeInfo.getOverlayHandler(gui, "crafting2x2");
   }
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:9,代码来源:GemmerationTableRecipeHandler.java

示例8: getOverlayRenderer

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
@Override
public IRecipeOverlayRenderer getOverlayRenderer(GuiContainer gui, int recipe) {
    IRecipeOverlayRenderer renderer = super.getOverlayRenderer(gui, recipe);
    if (renderer != null)
        return renderer;

    IStackPositioner positioner = RecipeInfo.getStackPositioner(gui, "crafting2x2");
    if (positioner == null)
        return null;
    return new DefaultOverlayRenderer(getIngredientStacks(recipe), positioner);
}
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:12,代码来源:IceWorkBenchRecipeHandler.java

示例9: getOverlayHandler

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
@Override
public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe) {
    IOverlayHandler handler = super.getOverlayHandler(gui, recipe);
    if (handler != null)
        return handler;

    return RecipeInfo.getOverlayHandler(gui, "crafting2x2");
}
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:9,代码来源:IceWorkBenchRecipeHandler.java

示例10: isCraftingGUI

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public static boolean isCraftingGUI(final GuiContainer gui) {
    return gui.getClass() == GuiCrafting.class || (RecipeInfo.hasOverlayHandler(gui, "crafting") && RecipeInfo.getOverlayHandler(gui, "crafting").getClass() == DefaultOverlayHandler.class);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:4,代码来源:NEIHelper.java

示例11: hasOverlay

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public boolean hasOverlay(final GuiContainer gui, final Container container, final int recipe) {
    return RecipeInfo.hasDefaultOverlay(gui, "microblocks") || RecipeInfo.hasOverlayHandler(gui, "microblocks") || (this.isRecipe2x2(recipe) && RecipeInfo.hasDefaultOverlay(gui, "microblocks2x2")) || super.hasOverlay(gui, container, recipe);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:4,代码来源:FMPMicroBlocksHandler.java

示例12: hasOverlay

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public boolean hasOverlay(GuiContainer gui, Container container, int recipe) {
return super.hasOverlay(gui, container, recipe) ||
	isRecipe2x2(recipe) && RecipeInfo.hasDefaultOverlay(gui, "crafting2x2");
   }
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:5,代码来源:GemmerationTableRecipeHandler.java

示例13: hasOverlay

import codechicken.nei.recipe.RecipeInfo; //导入依赖的package包/类
public boolean hasOverlay(GuiContainer gui, Container container, int recipe) {
    return super.hasOverlay(gui, container, recipe) ||
            isRecipe2x2(recipe) && RecipeInfo.hasDefaultOverlay(gui, "crafting2x2");
}
 
开发者ID:OwnAgePau,项目名称:Soul-Forest,代码行数:5,代码来源:IceWorkBenchRecipeHandler.java


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