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