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


Java ResearchCategories.getResearch方法代码示例

本文整理汇总了Java中thaumcraft.api.research.ResearchCategories.getResearch方法的典型用法代码示例。如果您正苦于以下问题:Java ResearchCategories.getResearch方法的具体用法?Java ResearchCategories.getResearch怎么用?Java ResearchCategories.getResearch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thaumcraft.api.research.ResearchCategories的用法示例。


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

示例1: isHidden

import thaumcraft.api.research.ResearchCategories; //导入方法依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public boolean isHidden() {
    if(anyParents != null) {
        boolean hasFoundAny = false;
        boolean doesAnyExist = false;
        for(String res : anyParents) {
            ResearchItem ri = ResearchCategories.getResearch(res);
            if(ri != null) {
                doesAnyExist = true;
                if(GuiResearchBrowser.completedResearch.get(Minecraft.getMinecraft().thePlayer.getCommandSenderName()).contains(ri.key)) {
                    hasFoundAny = true;
                }
            }
        }
        if(doesAnyExist) {
            return !hasFoundAny;
        }
    }
    return super.isHidden();
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:22,代码来源:IfAnyParentResearchItem.java

示例2: create

import thaumcraft.api.research.ResearchCategories; //导入方法依赖的package包/类
public static ResearchItem create(String original, int col, int row, boolean doubleInThisPage) {
    ResearchItem item = ResearchCategories.getResearch(original);

    if(item != null) {
        ResearchItem pseudo;

        if(item.icon_resource == null) {
            pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_item, doubleInThisPage);
        } else {
            pseudo = new PseudoResearchItem(item, item.key, col, row, item.icon_resource, doubleInThisPage);
        }

        String[] siblings = item.siblings;
        if(siblings == null) {
            siblings = new String[]{ pseudo.key };
        } else {
            siblings = Arrays.copyOf(siblings, siblings.length + 1);
            siblings[siblings.length - 1] = pseudo.key;
        }

        item.setSiblings(siblings);

        if(item.isSecondary()) {
            pseudo.setSecondary();
        }

        return pseudo.setParentsHidden(original);
    }
    return null;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:31,代码来源:PseudoResearchItem.java

示例3: shouldVortexResearchNote

import thaumcraft.api.research.ResearchCategories; //导入方法依赖的package包/类
private boolean shouldVortexResearchNote(ItemStack stack) {
    ResearchNoteData nd = ResearchManager.getData(stack);
    if(nd == null) return false;
    if(nd.isComplete()) return false;
    ResearchItem ri = ResearchCategories.getResearch(nd.key);
    return ri != null;
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:8,代码来源:TileKnowledgeBook.java

示例4: giveResearch

import thaumcraft.api.research.ResearchCategories; //导入方法依赖的package包/类
public static void giveResearch(EntityPlayer player, String research) {
	if (ResearchCategories.getResearch(research) != null) {
		giveRecursiveResearch(player, research);
		PacketHandler.INSTANCE.sendToServer(new PacketSyncResearch(player));
	}
}
 
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:7,代码来源:TOScanEvents.java


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