本文整理汇总了Java中thaumcraft.api.research.ResearchCategoryList类的典型用法代码示例。如果您正苦于以下问题:Java ResearchCategoryList类的具体用法?Java ResearchCategoryList怎么用?Java ResearchCategoryList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResearchCategoryList类属于thaumcraft.api.research包,在下文中一共展示了ResearchCategoryList类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: minus
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
@EventHandler
public void minus(FMLLoadCompleteEvent event) {
for(ResearchCategoryList tab : ResearchCategories.researchCategories.values()){
if(tab != null) {
for (ResearchItem item : tab.research.values()) {
if(item != null){
item.setAutoUnlock();
}
}
}
}
try {
Field warpMap = ThaumcraftApi.class.getDeclaredField("warpMap");
warpMap.setAccessible(true);
HashMap<Object, Integer> warpList = (HashMap<Object, Integer>)warpMap.get(null);
warpList.clear();
}
catch (Exception e){
e.printStackTrace();
}
}
开发者ID:SpitefulFox,项目名称:Unthaumic,代码行数:22,代码来源:Unthaumic.java
示例2: removeResearch
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
private static void removeResearch(String research)
{
Collection researchcategory = ResearchCategories.researchCategories.values();
for (Object obj : researchcategory)
{
Collection researchlist = ((ResearchCategoryList)obj).research.values();
for (Object researchitem : researchlist)
{
if (((ResearchItem)researchitem).key.equals(research))
{
researchlist.remove(researchitem);
break;
}
}
}
}
开发者ID:Zerokyuuni,项目名称:Ex-Aliquo,代码行数:17,代码来源:ExThaumiquo.java
示例3: removeResearch
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
private static void removeResearch(String research)
{
Collection researchcategory = ResearchCategories.researchCategories.values();
for (Object obj : researchcategory)
{
Collection researchlist = ((ResearchCategoryList)obj).research.values();
for (Object researchitem : researchlist)
{
if (((ResearchItem)researchitem).key.equals(research))
{
System.out.println("Removing Research " + ((ResearchItem)researchitem).key);
researchlist.remove(researchitem);
break;
}
}
}
}
开发者ID:Psioptic,项目名称:Ex-AliquoRedux,代码行数:18,代码来源:ExThaumiquo.java
示例4: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()};
if (keyCache.containsKey(key)) {
if (keyCache.get(key)==null) return null;
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0]))
return keyCache.get(key);
else
return null;
}
for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) {
for (ResearchItem ri:rcl.research.values()) {
if (ri.getPages()==null) continue;
for (int a=0;a<ri.getPages().length;a++) {
ResearchPage page = ri.getPages()[a];
if (page.recipe!=null && page.recipe instanceof CrucibleRecipe[]) {
CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe;
for (CrucibleRecipe cr:crs) {
if (cr.getRecipeOutput().isItemEqual(stack)) {
keyCache.put(key,new Object[] {ri.key,a});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key))
return new Object[] {ri.key,a};
}
}
} else
if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key,new Object[] {ri.key,a});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key))
return new Object[] {ri.key,a};
else
return null;
}
}
}
}
keyCache.put(key,null);
return null;
}
开发者ID:Brandomine,项目名称:Augury,代码行数:38,代码来源:ThaumcraftApi.java
示例5: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[] {Item.getIdFromItem(stack.getItem()),stack.getItemDamage()};
if (keyCache.containsKey(key)) {
if (keyCache.get(key)==null) return null;
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String)(keyCache.get(key))[0]))
return keyCache.get(key);
else
return null;
}
for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) {
for (ResearchItem ri:rcl.research.values()) {
if (ri.getPages()==null) continue;
for (int a=0;a<ri.getPages().length;a++) {
ResearchPage page = ri.getPages()[a];
if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key,new Object[] {ri.key,a});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key))
return new Object[] {ri.key,a};
else
return null;
}
}
}
}
keyCache.put(key,null);
return null;
}
开发者ID:Pokefenn,项目名称:ImLookingAtBlood,代码行数:28,代码来源:ThaumcraftApi.java
示例6: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[] { Item.getIdFromItem(stack.getItem()), stack.getItemDamage() };
if (keyCache.containsKey(key)) {
if (keyCache.get(key) == null)
return null;
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String) (keyCache.get(key))[0]))
return keyCache.get(key);
else
return null;
}
for (ResearchCategoryList rcl : ResearchCategories.researchCategories.values()) {
for (ResearchItem ri : rcl.research.values()) {
if (ri.getPages() == null)
continue;
for (int a = 0; a < ri.getPages().length; a++) {
ResearchPage page = ri.getPages()[a];
if (page.recipeOutput != null && stack != null && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key, new Object[] { ri.key, a });
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key))
return new Object[] { ri.key, a };
else
return null;
}
}
}
}
keyCache.put(key, null);
return null;
}
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:30,代码来源:ThaumcraftApi.java
示例7: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[] {stack.itemID,stack.getItemDamage()};
if (keyCache.containsKey(key)) {
if (keyCache.get(key)==null) return null;
if (ThaumcraftApiHelper.isResearchComplete(player.username, (String)(keyCache.get(key))[0]))
return keyCache.get(key);
else
return null;
}
for (ResearchCategoryList rcl:ResearchCategories.researchCategories.values()) {
for (ResearchItem ri:rcl.research.values()) {
if (ri.getPages()==null) continue;
for (int a=0;a<ri.getPages().length;a++) {
ResearchPage page = ri.getPages()[a];
if (page.recipeOutput!=null && stack !=null && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key,new Object[] {ri.key,a});
if (ThaumcraftApiHelper.isResearchComplete(player.username, ri.key))
return new Object[] {ri.key,a};
else
return null;
}
}
}
}
keyCache.put(key,null);
return null;
}
开发者ID:LezChap,项目名称:Thaumic-Tools,代码行数:28,代码来源:ThaumcraftApi.java
示例8: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[] {
Item.getIdFromItem(stack.getItem()),
stack.getItemDamage()
};
if (keyCache.containsKey(key)) {
if (keyCache.get(key) == null) {
return null;
}
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String) (keyCache.get(key))[0])) {
return keyCache.get(key);
}
else {
return null;
}
}
for (ResearchCategoryList rcl : ResearchCategories.researchCategories.values()) {
for (ResearchItem ri : rcl.research.values()) {
if (ri.getPages() == null) {
continue;
}
for (int a = 0; a < ri.getPages().length; a++ ) {
ResearchPage page = ri.getPages()[a];
if ( (page.recipe != null) && (page.recipe instanceof CrucibleRecipe[])) {
CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe;
for (CrucibleRecipe cr : crs) {
if (cr.getRecipeOutput().isItemEqual(stack)) {
keyCache.put(key, new Object[] {
ri.key,
a
});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) {
return new Object[] {
ri.key,
a
};
}
}
}
}
else if ( (page.recipeOutput != null) && (stack != null) && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key, new Object[] {
ri.key,
a
});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) {
return new Object[] {
ri.key,
a
};
}
else {
return null;
}
}
}
}
}
keyCache.put(key, null);
return null;
}
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:62,代码来源:ThaumcraftApi.java
示例9: getCraftingRecipeKey
import thaumcraft.api.research.ResearchCategoryList; //导入依赖的package包/类
public static Object[] getCraftingRecipeKey(EntityPlayer player, ItemStack stack) {
int[] key = new int[]{Item.getIdFromItem(stack.getItem()), stack.getItemDamage()};
if (keyCache.containsKey(key)) {
if (keyCache.get(key) == null) {
return null;
}
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), (String) (keyCache.get(key))[0])) {
return keyCache.get(key);
} else {
return null;
}
}
for (ResearchCategoryList rcl : ResearchCategories.researchCategories.values()) {
for (ResearchItem ri : rcl.research.values()) {
if (ri.getPages() == null) {
continue;
}
for (int a = 0; a < ri.getPages().length; a++) {
ResearchPage page = ri.getPages()[a];
if (page.recipe != null && page.recipe instanceof CrucibleRecipe[]) {
CrucibleRecipe[] crs = (CrucibleRecipe[]) page.recipe;
for (CrucibleRecipe cr : crs) {
if (cr.getRecipeOutput().isItemEqual(stack)) {
keyCache.put(key, new Object[]{ri.key, a});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) {
return new Object[]{ri.key, a};
}
}
}
} else if (page.recipeOutput != null && stack != null && page.recipeOutput.isItemEqual(stack)) {
keyCache.put(key, new Object[]{ri.key, a});
if (ThaumcraftApiHelper.isResearchComplete(player.getCommandSenderName(), ri.key)) {
return new Object[]{ri.key, a};
} else {
return null;
}
}
}
}
}
keyCache.put(key, null);
return null;
}
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:44,代码来源:ThaumcraftApi.java
注:本文中的thaumcraft.api.research.ResearchCategoryList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论