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