當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。