本文整理汇总了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;
}
示例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;}
}
示例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);
}
示例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();
}
示例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();
}
}
示例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);
}
示例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");
}
示例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);
}
示例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");
}
示例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);
}
示例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);
}
示例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");
}
示例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");
}