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


Java IConfigureNEI类代码示例

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


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

示例1: getMetadata

import codechicken.nei.api.IConfigureNEI; //导入依赖的package包/类
@Override
public ModMetadata getMetadata() {
    ModMetadata meta = super.getMetadata();
    meta.description = "Recipe Viewer, Inventory Manager, Item Spawner, Cheats and more.\n"+ EnumChatFormatting.WHITE+"\n";

    if (plugins.size() == 0) {
        meta.description += EnumChatFormatting.RED+"No installed plugins.";
    } else {
        meta.description += EnumChatFormatting.GREEN+"Installed plugins: ";
        for (int i = 0; i < plugins.size(); i++) {
            if (i > 0)
                meta.description += ", ";
            IConfigureNEI plugin = plugins.get(i);
            meta.description += plugin.getName() + " " + plugin.getVersion();
        }
        meta.description += ".";
    }

    return meta;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:21,代码来源:NEIModContainer.java

示例2: getMetadata

import codechicken.nei.api.IConfigureNEI; //导入依赖的package包/类
@Override
public ModMetadata getMetadata() {
    String s_plugins = "";
    if (plugins.size() == 0) {
        s_plugins += EnumChatFormatting.RED+"No installed plugins.";
    } else {
        s_plugins += EnumChatFormatting.GREEN+"Installed plugins: ";
        for (int i = 0; i < plugins.size(); i++) {
            if (i > 0)
                s_plugins += ", ";
            IConfigureNEI plugin = plugins.get(i);
            s_plugins += plugin.getName() + " " + plugin.getVersion();
        }
        s_plugins += ".";
    }

    ModMetadata meta = super.getMetadata();
    meta.description = description.replace("<plugins>", s_plugins);
    return meta;
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:21,代码来源:NEIModContainer.java

示例3: replaceMetadata

import codechicken.nei.api.IConfigureNEI; //导入依赖的package包/类
private static void replaceMetadata() {

        StringBuilder builder = new StringBuilder("\n\n");

        if (plugins.isEmpty()) {
            builder.append(TextFormatting.RED).append("No installed plugins.");
        } else {
            builder.append(TextFormatting.GREEN).append("Installed plugins: ");
            for (IConfigureNEI plugin : plugins) {
                builder.append("\n");
                builder.append("      ").append(TextFormatting.GREEN);
                builder.append(plugin.getName()).append(", Version: ").append(plugin.getVersion());

            }
        }
        builder.append("\n\n");
        //String desc = ModDescriptionEnhancer.enhanceDesc(NotEnoughItems.metadata.description);
        NotEnoughItems.metadata.description = NotEnoughItems.metadata.description.replace("<plugins>", builder.toString());
    }
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:20,代码来源:NEIInitialization.java

示例4: scrapeData

import codechicken.nei.api.IConfigureNEI; //导入依赖的package包/类
public static void scrapeData(ASMDataTable dataTable) {
    ImmutableList.Builder<IConfigureNEI> plugins = ImmutableList.builder();
    for (ASMDataTable.ASMData data : dataTable.getAll(NEIPlugin.class.getName())) {
        try {
            Class<?> pluginClass = Class.forName(data.getClassName());
            if (IConfigureNEI.class.isAssignableFrom(pluginClass)) {
                IConfigureNEI pluginInstance = (IConfigureNEI) pluginClass.newInstance();
                plugins.add(pluginInstance);
            } else {
                LogHelper.error("Found class with annotation @NEIPlugin but class does not implement IConfigureNEI.. Class: " + data.getClassName());
            }

        } catch (Exception e) {
            LogHelper.fatalError("Fatal exception occurred whilst loading a plugin! Class: %s", e, data.getClassName());
        }
    }
    NEIInitialization.plugins = plugins.build();

}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:20,代码来源:NEIInitialization.java

示例5: bootNEI

import codechicken.nei.api.IConfigureNEI; //导入依赖的package包/类
/**
 * Called to do first initialization of NEI's core components.
 * Including default item filters, Plugin initialization. ect.
 */
public static void bootNEI() {
    long start = System.nanoTime();
    LogHelper.info("Loading NEI.");
    NEIClientConfig.loadStates();
    PotionRecipeHelper.init();
    hideVanillaItems();
    addBaseSubsets();
    loadDefaultSubsets();
    loadPotionSubsets();
    loadModSubsets();
    loadRegistryDumps();
    API.addItemFilter(() -> item -> !ItemInfo.hiddenItems.contains(item));
    API.addItemFilter(() -> item -> !JEIIntegrationManager.isBlacklisted(item));
    ItemList.registerLoadCallback(ItemInfo.itemSearchNames::clear);
    GuiInfo.load();
    LayoutManager.load();
    NEIController.load();

    for (IConfigureNEI plugin : plugins) {
        try {
            plugin.loadConfig();
            LogHelper.debug("Loaded Plugin: %s[%s]", plugin.getName(), plugin.getClass().getName());
        } catch (Exception e) {
            LogHelper.fatalError("Caught fatal exception from an NEI plugin! Class: ", e, plugin.getClass().getName());
        }
    }

    replaceMetadata();

    ItemSorter.loadConfig();
    LogHelper.info("Finished NEI Initialization after %s ms", TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start));

}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:38,代码来源:NEIInitialization.java


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