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


Java PageType类代码示例

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


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

示例1: setPages

import thaumcraft.api.research.ResearchPage.PageType; //导入依赖的package包/类
@Override
public ResearchItem setPages(ResearchPage... par) {
    for (ResearchPage page : par) {
        if (page.type == PageType.TEXT)
            page.text = "emt.text." + key;

        if (page.type == PageType.INFUSION_CRAFTING) {
            if (parentsHidden == null || parentsHidden.length == 0)
                parentsHidden = new String[]{"INFUSION"};
            else {
                String[] newParents = new String[parentsHidden.length + 1];
                newParents[0] = "INFUSION";
                for (int i = 0; i < parentsHidden.length; i++)
                    newParents[i + 1] = parentsHidden[i];
                parentsHidden = newParents;
            }
        }
    }

    return super.setPages(par);
}
 
开发者ID:TeamAmeriFrance,项目名称:Electro-Magic-Tools,代码行数:22,代码来源:EMTResearchItem.java

示例2: setPages

import thaumcraft.api.research.ResearchPage.PageType; //导入依赖的package包/类
@Override
public ResearchItem setPages(ResearchPage... pages) {
    for (ResearchPage page : pages) {
        if (page.type == PageType.TEXT) {
            page.text = "xarresearch.page." + key + "." + page.text;
        }

        //if our page type is 'INFUSION_CRAFTING' ensure that this page only displays when we have unlocked
        //infusion crafting. We use 'parentsHidden' here because we are adding this research to our own tab(s)
        //so there is no need to try to draw the line that attaches most other research
        if (page.type == PageType.INFUSION_CRAFTING) {
            //add the infusion research to its list of 'parentsHidden' if it has none already
            if (parentsHidden == null || parentsHidden.length == 0) {
                parentsHidden = new String[]{"INFUSION"};
            }
            //otherwise add it to its 'parentsHidden'
            else {
                String[] newParents = new String[parentsHidden.length + 1];
                newParents[0] = "INFUSION";
                for (int i = 0; i < parentsHidden.length; i++) {
                    newParents[i + 1] = parentsHidden[i];
                }
                parentsHidden = newParents;
            }
        }
    }
    return super.setPages(pages);
}
 
开发者ID:Aurilux,项目名称:Xth-uoth,代码行数:29,代码来源:XARResearchItem.java

示例3: setPages

import thaumcraft.api.research.ResearchPage.PageType; //导入依赖的package包/类
@Override
public ResearchItem setPages(ResearchPage... pages) {

    for(ResearchPage Page : pages) {

        if(Page.type == PageType.TEXT)

            Page.text = "twresearch.page." + key + "." + Page.text;

    }


    return super.setPages(pages);

}
 
开发者ID:MasterAbdoTGM50,项目名称:ThaumicWarden,代码行数:16,代码来源:ModResearchItem.java


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