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


Java InfusionRecipe类代码示例

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


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

示例1: loadCraftingRecipes

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
@Override
public void loadCraftingRecipes(ItemStack result) {
	List recipes = ThaumcraftApi.getCraftingRecipes();
	for (int i = 0; i < recipes.size(); i++){//Sorry, no enhanced for loop here :P
		if (recipes.get(i) instanceof InfusionRecipe) {
			InfusionRecipe recipe = (InfusionRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				Object output = recipe.getRecipeOutput();
				if (output instanceof ItemStack) {
					if (((ItemStack)output).isItemEqual(result)) {
						if (checkDupe(recipe)) {
							this.arecipes.add(new CachedInfusionRecipe(recipe));
						}
					}
				}else {
					//TODO
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:22,代码来源:InfusionHandler.java

示例2: loadUsageRecipes

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
@Override
public void loadUsageRecipes(ItemStack ingredient) {
	List recipes = ThaumcraftApi.getCraftingRecipes();
	for (int i = 0; i < recipes.size(); i++) {//Sorry, no enhanced for loop here again :P
		if (recipes.get(i) instanceof InfusionRecipe) {
			InfusionRecipe recipe = (InfusionRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				if (recipe.getComponents() != null) {
					ArrayList<ItemStack> components = new ArrayList<ItemStack>(Arrays.asList(recipe.getComponents()));
					if (recipe.getRecipeInput().isItemEqual(ingredient) || components.contains(ingredient)) {
						if (checkDupe(recipe)) {
							this.arecipes.add(new CachedInfusionRecipe(recipe));
						}
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:20,代码来源:InfusionHandler.java

示例3: ResearchPage

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param recipe
 *        an infusion crafting recipe.
 */
public ResearchPage(InfusionRecipe recipe) {
	this.type = PageType.INFUSION_CRAFTING;
	this.recipe = recipe;
	if (recipe.getRecipeOutput() instanceof ItemStack) {
		this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
	}
	else {
		this.recipeOutput = recipe.getRecipeInput();
	}
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:15,代码来源:ResearchPage.java

示例4: getInfusionRecipe

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param stack
 *        the recipe result
 * @return the recipe
 */
public static InfusionRecipe getInfusionRecipe(ItemStack res) {
	for (Object r : getCraftingRecipes()) {
		if (r instanceof InfusionRecipe) {
			if ( ((InfusionRecipe) r).getRecipeOutput() instanceof ItemStack) {
				if ( ((ItemStack) ((InfusionRecipe) r).getRecipeOutput()).isItemEqual(res)) {
					return (InfusionRecipe) r;
				}
			}
		}
	}
	return null;
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:18,代码来源:ThaumcraftApi.java

示例5: ResearchPage

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param recipe an infusion crafting recipe.
 */
public ResearchPage(InfusionRecipe recipe) {
	this.type = PageType.INFUSION_CRAFTING;
	this.recipe = recipe;
	if (recipe.getRecipeOutput() instanceof ItemStack) {
		this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
	} else {
		this.recipeOutput = recipe.getRecipeInput();
	}
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:13,代码来源:ResearchPage.java

示例6: getInfusionRecipe

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param stack the recipe result
 * @return the recipe
 */
public static InfusionRecipe getInfusionRecipe(ItemStack res) {
	for (Object r:getCraftingRecipes()) {
		if (r instanceof InfusionRecipe) {
			if (((InfusionRecipe)r).getRecipeOutput() instanceof ItemStack) {
				if (((ItemStack) ((InfusionRecipe)r).getRecipeOutput()).isItemEqual(res))
					return (InfusionRecipe)r;
			} 
		}
	}
	return null;
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:16,代码来源:ThaumcraftApi.java

示例7: ResearchPage

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param recipe an infusion crafting recipe.
 */
public ResearchPage(InfusionRecipe recipe)
{
    this.type = PageType.INFUSION_CRAFTING;
    this.recipe = recipe;
    if(recipe.getRecipeOutput() instanceof ItemStack)
    {
        this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
    }
    else
    {
        this.recipeOutput = recipe.getRecipeInput();
    }
}
 
开发者ID:J3FF97,项目名称:Steel-Industries,代码行数:17,代码来源:ResearchPage.java

示例8: ResearchPage

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param recipe an infusion crafting recipe.
 */
public ResearchPage(InfusionRecipe recipe) {
    this.type = PageType.INFUSION_CRAFTING;
    this.recipe = recipe;
    if (recipe.getRecipeOutput() instanceof ItemStack) {
        this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
    } else {
        this.recipeOutput = recipe.getRecipeInput();
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:13,代码来源:ResearchPage.java

示例9: getInfusionRecipe

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param stack the recipe result
 * @return the recipe
 */
public static InfusionRecipe getInfusionRecipe(ItemStack res) {
    for (Object r : getCraftingRecipes()) {
        if (r instanceof InfusionRecipe) {
            if (((InfusionRecipe) r).getRecipeOutput() instanceof ItemStack) {
                if (((ItemStack) ((InfusionRecipe) r).getRecipeOutput()).isItemEqual(res)) {
                    return (InfusionRecipe) r;
                }
            }
        }
    }
    return null;
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:17,代码来源:ThaumcraftApi.java

示例10: checkDupe

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
private boolean checkDupe(InfusionRecipe recipe) {
	for (Object o : this.arecipes.toArray()){
		if (o instanceof CachedInfusionRecipe){
			CachedInfusionRecipe r = (CachedInfusionRecipe) o;
			if (r.recipe.getRecipeInput() == recipe.getRecipeInput()){
				if (r.recipe.getRecipeOutput().equals(recipe.getRecipeOutput())) {
					return false;
				}
			}
		}
	}
	return true;
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:14,代码来源:InfusionHandler.java

示例11: CachedInfusionRecipe

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
public CachedInfusionRecipe(InfusionRecipe recipe){
	this.aspects = recipe.getAspects();
	this.output = new PositionedStack(recipe.getRecipeOutput(), outCoords[0], outCoords[1]);
	this.recipe = recipe;
	this.instability = recipe.getInstability();
	this.inputs.add(new PositionedStack(recipe.getRecipeInput(), inCoords1[0], inCoords1[1]));
	calcInputPositions(recipe.getComponents());
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:9,代码来源:InfusionHandler.java

示例12: ResearchPage

import thaumcraft.api.crafting.InfusionRecipe; //导入依赖的package包/类
/**
 * @param recipe
 *            an infusion crafting recipe.
 */
public ResearchPage(InfusionRecipe recipe) {
	this.type = PageType.INFUSION_CRAFTING;
	this.recipe = recipe;
	if (recipe.getRecipeOutput() instanceof ItemStack) {
		this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
	} else {
		this.recipeOutput = recipe.getRecipeInput();
	}
}
 
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:14,代码来源:ResearchPage.java


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