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