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


Java API类代码示例

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


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

示例1: JEIProxy

import codechicken.nei.api.API; //导入依赖的package包/类
public JEIProxy() {
    MinecraftForge.EVENT_BUS.register(new EventHandler());
    API.registerNEIGuiHandler(new INEIGuiHandler() {
        @Override
        public boolean hideItemPanelSlot(GuiContainer gui, int x, int y, int w, int h) {
            if (extraAreasCache == null) {
                extraAreasCache = getExtraAreas(gui);
            }
            for (Rectangle rectangle : extraAreasCache) {
                if (rectangle.intersects(x, y, w, h)) {
                    return true;
                }
            }
            return false;
        }
    });
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:18,代码来源:JEIProxy.java

示例2: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
    public void loadConfig() {
        // this is just a copy of the recipe. Couldn't I automate it?

//        this.addCircuitFabricatorRecipe(new ItemStack(Items.diamond), new ItemStack(Items.redstone), new ItemStack(Items.ender_pearl), ARItems.waferEnder.getItemStack(1));
//        this.addCircuitFabricatorRecipe(ARItems.lithiumGem.getItemStack(1), new ItemStack(Items.redstone), new ItemStack(Items.paper), ARItems.lithiumMesh.getItemStack(1));

        // now do the circfab
        initCircuitFabricatorRecipes();

        // so at this point I would add the rocket recipe?
        initShuttleRecipes();

        API.registerRecipeHandler(new ARCircuitFab());
        API.registerUsageHandler(new ARCircuitFab());
        API.registerRecipeHandler(new ARNasaWorkbenchShuttle());
        API.registerUsageHandler(new ARNasaWorkbenchShuttle());
    }
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:19,代码来源:NEIAmunRaConfig.java

示例3: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig() {
	
	API.hideItem(new ItemStack(InitBlocks.reinforced_door));
	
	for (int i = 0; i < BlockChargedPlant.icons.length; i++) {
		API.hideItem(new ItemStack(InitBlocks.charged_plant, 1, i));
	}
	
	API.registerRecipeHandler(new InfusionTableRecipeHandler());
	API.registerUsageHandler(new InfusionTableRecipeHandler());
	
	API.registerRecipeHandler(new InfusionFoundryRecipeHandler());
	API.registerUsageHandler(new InfusionFoundryRecipeHandler());
	
	API.registerRecipeHandler(new MissileFactoryRecipeHandler());
	API.registerUsageHandler(new MissileFactoryRecipeHandler());
	
	API.registerRecipeHandler(new EnergeticFurnaceRecipeHandler());
	API.registerUsageHandler(new EnergeticFurnaceRecipeHandler());
	
	API.registerRecipeHandler(new OreEnricherRecipeHandler());
	API.registerUsageHandler(new OreEnricherRecipeHandler());
}
 
开发者ID:TeamMonumental,项目名称:FusionWarfare,代码行数:25,代码来源:NEIFusionWarfareConfig.java

示例4: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override public void loadConfig()
{
    API.registerUsageHandler(new AlloyerHandler());
    API.registerRecipeHandler(new AlloyerHandler());

    API.registerUsageHandler(new CrusherHandler());
    API.registerRecipeHandler(new CrusherHandler());

    API.registerUsageHandler(new ForgeHandler());
    API.registerRecipeHandler(new ForgeHandler());
    
    API.hideItem(new ItemStack(BlockList.tabBlock));
    API.hideItem(new ItemStack(ItemList.tabItem));
    API.hideItem(new ItemStack(ItemList.tabItem,1,1));
    API.hideItem(new ItemStack(ItemList.tabItem,1,2));
}
 
开发者ID:TeamMetallurgy,项目名称:Metallurgy4,代码行数:17,代码来源:NEIConfig.java

示例5: ModuleNEI

import codechicken.nei.api.API; //导入依赖的package包/类
/**
 * Integrates with Not Enough Items
 *
 * @throws Exception
 */
public ModuleNEI() throws Exception
{
	// Register the ACT overlays
	API.registerGuiOverlay( thaumicenergistics.client.gui.GuiArcaneCraftingTerminal.class, "crafting", new ACTSlotPositioner() );

	// Create the regular overlay handler
	ACTOverlayHandler craftingOverlayHandler = new ACTOverlayHandler( false );

	// Create the arcane overlay handler
	ACTOverlayHandler arcaneOverlayHandler = new ACTOverlayHandler( true );

	// Register the handlers
	API.registerGuiOverlayHandler( thaumicenergistics.client.gui.GuiArcaneCraftingTerminal.class, craftingOverlayHandler, "crafting" );
	API.registerGuiOverlayHandler( thaumicenergistics.client.gui.GuiArcaneCraftingTerminal.class, arcaneOverlayHandler, "arcaneshapedrecipes" );
	API.registerGuiOverlayHandler( thaumicenergistics.client.gui.GuiArcaneCraftingTerminal.class, arcaneOverlayHandler,
		"arcaneshapelessrecipes" );

	// Hide the crafting aspect item
	API.hideItem( ItemEnum.CRAFTING_ASPECT.getStack() );

}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:27,代码来源:ModuleNEI.java

示例6: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig(){
	//API.registerRecipeHandler();
	if (Config.filter) {
		API.addSearchProvider(new AspectFilter());
	}
	if (!Config.hideNonResearched){
		//API.addSearchProvider(new ThaumItemFilter());TODO
	}
	API.registerRecipeHandler(new ShapedArcaneWorkbenchHandler());
	API.registerUsageHandler(new ShapedArcaneWorkbenchHandler());

	API.registerRecipeHandler(new ShapelessArcaneWorkbenchHandler());
	API.registerUsageHandler(new ShapelessArcaneWorkbenchHandler());

	API.registerRecipeHandler(new CrucibleHandler());
	API.registerUsageHandler(new CrucibleHandler());

	API.registerRecipeHandler(new InfusionHandler());
	API.registerUsageHandler(new InfusionHandler());

	//OverlayHandler overlayHandler = new OverlayHandler(14, 4, ArcaneWorkbenchHelper.slotCraftMatrix);FIXME
	//API.registerGuiOverlayHandler(ArcaneWorkbenchHelper.guiArcaneTable, overlayHandler, "crafting");FIXME
	//API.registerGuiOverlayHandler(ArcaneWorkbenchHelper.guiArcaneTable, overlayHandler, "arcane");FIXME
 }
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:26,代码来源:NEIThaumicConfig.java

示例7: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig() {

    NEISieveRecipeHandler sieveRecipeHandler = new NEISieveRecipeHandler();
    API.registerRecipeHandler(sieveRecipeHandler);
    API.registerUsageHandler(sieveRecipeHandler);

    NEIHammerRecipeHandler hammerRecipeHandler = new NEIHammerRecipeHandler();
    API.registerRecipeHandler(hammerRecipeHandler);
    API.registerUsageHandler(hammerRecipeHandler);

    NEICompostRecipeHandler compostRecipeHandler = new NEICompostRecipeHandler();
    API.registerRecipeHandler(compostRecipeHandler);
    API.registerUsageHandler(compostRecipeHandler);

}
 
开发者ID:RedRockFowl,项目名称:ex-nihilo-nei,代码行数:17,代码来源:NEIExNihiloConfig.java

示例8: onWorldLoaded

import codechicken.nei.api.API; //导入依赖的package包/类
@ForgeSubscribe
public void onWorldLoaded(Load event)
{
    if (event.world.isRemote && Loader.isModLoaded("NotEnoughItems"))
    {
        API.registerGuiOverlayHandler(GuiMatterCreator.class,
                new NEIOverlayHandler(), "crafting");
        API.setMaxDamageException(ModBlocks.matterDistillery.blockID, 0);
        API.setMaxDamageException(ModBlocks.cropRipener.blockID, 0);
        API.setMaxDamageException(ModBlocks.cropRipener.blockID, 0);
        API.setMaxDamageException(ModBlocks.matterCreator.blockID, 0);
        API.setMaxDamageException(ModBlocks.fluidDistillery.blockID, 0);
        API.setMaxDamageException(ModBlocks.fluidCreator.blockID, 0);
        API.setMaxDamageException(ModBlocks.matterSuperheater.blockID, 0);
        API.setMaxDamageException(ModBlocks.energyDistillery.blockID, 0);
    }
}
 
开发者ID:Dynious,项目名称:EnergyFromMatter,代码行数:18,代码来源:WorldEventHandler.java

示例9: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig()
{
    API.registerRecipeHandler(new BrewerRecipeHandler());
    API.registerUsageHandler(new BrewerRecipeHandler());

    API.registerRecipeHandler(new CounterRecipeHandler());
    API.registerUsageHandler(new CounterRecipeHandler());

    API.registerRecipeHandler(new FrierRecipeHandler());
    API.registerUsageHandler(new FrierRecipeHandler());

    API.registerRecipeHandler(new IceBoxRecipeHandler());
    API.registerUsageHandler(new IceBoxRecipeHandler());

    API.registerRecipeHandler(new OvenRecipeHandler());
    API.registerUsageHandler(new OvenRecipeHandler());

    API.registerRecipeHandler(new ProcessorRecipeHandler());
    API.registerUsageHandler(new ProcessorRecipeHandler());
}
 
开发者ID:TeamMetallurgy,项目名称:Agriculture2,代码行数:22,代码来源:NEIAgricultureConfig.java

示例10: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig()
{
    API.registerUsageHandler(new ProcessorHandler());
    API.registerRecipeHandler(new ProcessorHandler());

    API.registerUsageHandler(new CounterHandler());
    API.registerRecipeHandler(new CounterHandler());

    API.registerUsageHandler(new OvenHandler());
    API.registerRecipeHandler(new OvenHandler());

    API.registerUsageHandler(new FrierHandler());
    API.registerRecipeHandler(new FrierHandler());

    API.registerUsageHandler(new IceBoxHandler());
    API.registerRecipeHandler(new IceBoxHandler());

    API.registerUsageHandler(new FrierHandler());
    API.registerRecipeHandler(new FrierHandler());
}
 
开发者ID:TeamMetallurgy,项目名称:Agriculture,代码行数:22,代码来源:NEIConfig.java

示例11: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig() {
	if (EtFuturum.enableBanners) {
		API.registerRecipeHandler(new BannerPatternHandler());
		API.registerUsageHandler(new BannerPatternHandler());
	}

	if (EtFuturum.enableBeetroot)
		API.hideItem(new ItemStack(ModBlocks.beetroot));
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:11,代码来源:NEIEtFuturumConfig.java

示例12: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig()
{
    this.registerRecipes();
    API.registerRecipeHandler(new RocketT2RecipeHandler());
    API.registerUsageHandler(new RocketT2RecipeHandler());
    API.registerRecipeHandler(new CargoRocketRecipeHandler());
    API.registerUsageHandler(new CargoRocketRecipeHandler());
    API.registerRecipeHandler(new GasLiquefierRecipeHandler());
    API.registerUsageHandler(new GasLiquefierRecipeHandler());
    API.registerRecipeHandler(new MethaneSynthesizerRecipeHandler());
    API.registerUsageHandler(new MethaneSynthesizerRecipeHandler());
    API.registerHighlightIdentifier(MarsBlocks.marsBlock, planetsHighlightHandler);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:15,代码来源:NEIGalacticraftMarsConfig.java

示例13: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig()
{
    this.registerRecipes();
    API.registerRecipeHandler(new RocketT3RecipeHandler());
    API.registerUsageHandler(new RocketT3RecipeHandler());
    API.registerRecipeHandler(new AstroMinerRecipeHandler());
    API.registerUsageHandler(new AstroMinerRecipeHandler());
    API.registerHighlightIdentifier(AsteroidBlocks.blockBasic, NEIGalacticraftMarsConfig.planetsHighlightHandler);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:11,代码来源:NEIGalacticraftAsteroidsConfig.java

示例14: loadConfig

import codechicken.nei.api.API; //导入依赖的package包/类
@Override
public void loadConfig()
{
    this.registerRecipes();

    for (Item item : GCItems.hiddenItems)
    {
        API.hideItem(new ItemStack(item, 1, 0));
    }

    for (Block block : GCBlocks.hiddenBlocks)
    {
        API.hideItem(new ItemStack(block, 1, 0));
        if (block == GCBlocks.slabGCDouble)
        {
        	for (int j = 1; j < (GalacticraftCore.isPlanetsLoaded ? 6 : 4); j++)
        		API.hideItem(new ItemStack(block, 1, j));
        }
    }

    API.registerRecipeHandler(new RocketT1RecipeHandler());
    API.registerUsageHandler(new RocketT1RecipeHandler());
    API.registerRecipeHandler(new BuggyRecipeHandler());
    API.registerUsageHandler(new BuggyRecipeHandler());
    API.registerRecipeHandler(new RefineryRecipeHandler());
    API.registerUsageHandler(new RefineryRecipeHandler());
    API.registerRecipeHandler(new CircuitFabricatorRecipeHandler());
    API.registerUsageHandler(new CircuitFabricatorRecipeHandler());
    API.registerRecipeHandler(new IngotCompressorRecipeHandler());
    API.registerUsageHandler(new IngotCompressorRecipeHandler());
    API.registerRecipeHandler(new ElectricIngotCompressorRecipeHandler());
    API.registerUsageHandler(new ElectricIngotCompressorRecipeHandler());
    API.registerHighlightIdentifier(GCBlocks.basicBlock, new GCNEIHighlightHandler());
    API.registerHighlightIdentifier(GCBlocks.blockMoon, new GCNEIHighlightHandler());
    API.registerHighlightIdentifier(GCBlocks.fakeBlock, new GCNEIHighlightHandler());
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:37,代码来源:NEIGalacticraftConfig.java

示例15: load

import codechicken.nei.api.API; //导入依赖的package包/类
public static void load() {
    instance = new ClientHandler();

    PacketCustom.assignHandler(NEICPH.channel, new NEICPH());
    FMLCommonHandler.instance().bus().register(instance);
    MinecraftForge.EVENT_BUS.register(instance);

    API.registerHighlightHandler(new DefaultHighlightHandler(), ItemInfo.Layout.HEADER);
    HUDRenderer.load();
    WorldOverlayRenderer.load();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:12,代码来源:ClientHandler.java


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