本文整理汇总了Java中codechicken.nei.api.IOverlayHandler类的典型用法代码示例。如果您正苦于以下问题:Java IOverlayHandler类的具体用法?Java IOverlayHandler怎么用?Java IOverlayHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IOverlayHandler类属于codechicken.nei.api包,在下文中一共展示了IOverlayHandler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的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);
}
示例2: overlayRecipe
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
private void overlayRecipe(int recipe) {
IRecipeOverlayRenderer renderer = currenthandlers.get(recipetype).getOverlayRenderer(firstGui, recipe);
IOverlayHandler handler = currenthandlers.get(recipetype).getOverlayHandler(firstGui, recipe);
boolean shift = NEIClientUtils.shiftKey();
if (handler != null && (renderer == null || shift)) {
mc.displayGuiScreen(firstGui);
handler.overlayRecipe(firstGui, currenthandlers.get(recipetype), recipe, shift);
} else if (renderer != null) {
mc.displayGuiScreen(firstGui);
LayoutManager.overlayRenderer = renderer;
}
}
示例3: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的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");
}
示例4: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的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");
}
示例5: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的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");
}
示例6: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public IOverlayHandler getOverlayHandler(final GuiContainer gui, final int recipe) {
return null;
}
示例7: loadConfig
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public void loadConfig() {
NEIPing.init();
if (ExtraUtils.drum != null) {
API.addSubset("Extra Common.Drums", (ItemFilter)new SubsetItemsNBT(Item.getItemFromBlock(ExtraUtils.drum)));
}
if (ExtraUtils.microBlocks != null) {
API.addSubset("Extra Common.Extra Microblocks", (ItemFilter)new SubsetItemsNBT(ExtraUtils.microBlocks));
}
if (ExtraUtils.colorBlockDataEnabled) {
API.addSubset("Extra Common.Colored Blocks", (ItemFilter)new SubsetBlockClass(BlockColor.class));
}
if (ExtraUtils.greenScreen != null) {
API.addSubset("Extra Common.Lapis Caelestis", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.greenScreen) }));
}
if (ExtraUtils.cobblestoneCompr != null) {
API.addSubset("Extra Common.Compressed Blocks", (ItemFilter)new SubsetItems(new Item[] { Item.getItemFromBlock((Block)ExtraUtils.cobblestoneCompr) }));
}
if (ExtraUtils.decorative1Enabled || ExtraUtils.decorative2Enabled) {
API.addSubset("Extra Common.Decorative Blocks", (ItemFilter)new SubsetBlockClass(BlockDecoration.class));
}
if (ExtraUtils.generator2 != null) {
final SubsetItems s = new SubsetItems(new Item[] { Item.getItemFromBlock(ExtraUtils.generator2) });
if (ExtraUtils.generator3 != null) {
s.addItem(Item.getItemFromBlock(ExtraUtils.generator3));
}
API.addSubset("Extra Common.Higher Tier Generators", (ItemFilter)s);
}
for (final Matcher matcher : AdvancedNodeUpgrades.entryList) {
if (matcher != AdvancedNodeUpgrades.nullMatcher && matcher.type == Matcher.Type.ITEM && matcher.shouldAddToNEI() && matcher.isSelectable()) {
String localizedName = matcher.getLocalizedName();
localizedName = localizedName.replace(".exe", "");
localizedName = localizedName.replaceAll("\\.", "");
API.addSubset("Extra Filtering." + localizedName, (ItemFilter)new ItemFilterWrapper(matcher));
}
}
API.registerRecipeHandler((ICraftingHandler)new EnderConstructorHandler());
API.registerUsageHandler((IUsageHandler)new EnderConstructorHandler());
API.registerRecipeHandler((ICraftingHandler)new InfoHandler());
API.registerUsageHandler((IUsageHandler)new InfoHandler());
API.registerRecipeHandler((ICraftingHandler)new SoulHandler());
API.registerUsageHandler((IUsageHandler)new SoulHandler());
if (Loader.isModLoaded("ForgeMultipart")) {
API.registerRecipeHandler((ICraftingHandler)new FMPMicroBlocksHandler());
API.registerUsageHandler((IUsageHandler)new FMPMicroBlocksHandler());
API.registerRecipeHandler((ICraftingHandler)new MicroBlocksHandler());
API.registerUsageHandler((IUsageHandler)new MicroBlocksHandler());
API.registerGuiOverlayHandler((Class)GuiCrafting.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(), "microblocks");
API.registerGuiOverlayHandler((Class)GuiInventory.class, (IOverlayHandler)new FMPMicroBlocksOverlayHandler(63, 20), "microblocks2x2");
}
if (ExtraUtils.colorBlockData != null) {
API.hideItem(new ItemStack(ExtraUtils.colorBlockData));
}
LogHelper.info("Added NEI integration", new Object[0]);
}
示例8: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
@Override
public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe) {
return RecipeInfo.getOverlayHandler(gui, getOverlayIdentifier());
}
示例9: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
@Override
public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe)
{
return null;
}
示例10: registerOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public static void registerOverlayHandler(Class<? extends GuiContainer> classz, IOverlayHandler handler, String ident)
{
overlayMap.put(new OverlayKey(classz, ident), handler);
}
示例11: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public static IOverlayHandler getOverlayHandler(GuiContainer gui, String ident)
{
return overlayMap.get(new OverlayKey(gui.getClass(), ident));
}
示例12: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
@Override
public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe) {
return null;
}
示例13: registerOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public static void registerOverlayHandler(Class<? extends GuiContainer> classz, IOverlayHandler handler, String ident) {
overlayMap.put(new OverlayKey(classz, ident), handler);
}
示例14: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
public static IOverlayHandler getOverlayHandler(GuiContainer gui, String ident) {
return overlayMap.get(new OverlayKey(gui.getClass(), ident));
}
示例15: getOverlayHandler
import codechicken.nei.api.IOverlayHandler; //导入依赖的package包/类
/**
*
* @param recipe The recipe index to get the overlay renderer for.
* @return An instance of {@link IOverlayHandler} to be used for rendering the overlay of this specific recipe.
*/
public IOverlayHandler getOverlayHandler(GuiContainer gui, int recipe);