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


Java ThaumcraftApi.getCraftingRecipes方法代码示例

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


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

示例1: scan

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
@Override
public void scan() {
    for (Object r : ThaumcraftApi.getCraftingRecipes()) {
        if (r instanceof CrucibleRecipe) {
            CrucibleRecipe crucibleRecipe = (CrucibleRecipe) r;
            ItemStack result = crucibleRecipe.getRecipeOutput();
            Object input = crucibleRecipe.catalyst;

            if (input instanceof ItemStack) {
                addCatalyst(new VanillaStackWrapper(result), (ItemStack)input);
            } else if (input instanceof List<?>) {
                addCatalyst(new VanillaStackWrapper(result), (ItemStack[]) ((List) input).toArray(new ItemStack[((List) input).size()]));
            }
        }
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:17,代码来源:ThaumcraftCrucibleScanner.java

示例2: loadCraftingRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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 ShapedArcaneRecipe) {
			ShapedArcaneRecipe recipe = (ShapedArcaneRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				if (recipe.getRecipeOutput().isItemEqual(result)) {
					if (checkDupe(recipe)) {
						this.arecipes.add(new CachedShapedArcaneWorkbenchRecipe(recipe));
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:17,代码来源:ShapedArcaneWorkbenchHandler.java

示例3: loadUsageRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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 ShapedArcaneRecipe) {
			ShapedArcaneRecipe recipe = (ShapedArcaneRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				for (Object o : recipe.getInput()) {
					if (o instanceof ItemStack) {
						ItemStack item = (ItemStack) o;
						if (item.isItemEqual(ingredient)) {
							if (checkDupe(recipe)) {
								this.arecipes.add(new CachedShapedArcaneWorkbenchRecipe(recipe));
							}
						}
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:22,代码来源:ShapedArcaneWorkbenchHandler.java

示例4: loadCraftingRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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 CrucibleRecipe) {
			CrucibleRecipe recipe = (CrucibleRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.key) || Config.cheatMode){
				if (recipe.getRecipeOutput().isItemEqual(result)) {
					if (checkDupe(recipe)) {
						this.arecipes.add(new CachedCrucibleRecipe(recipe));
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:17,代码来源:CrucibleHandler.java

示例5: loadCraftingRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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

示例6: loadUsageRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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

示例7: loadCraftingRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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 ShapelessArcaneRecipe) {
			ShapelessArcaneRecipe recipe = (ShapelessArcaneRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				if (recipe.getRecipeOutput().isItemEqual(result)) {
					if (checkDupe(recipe)) {
						CachedShapelessArcaneWorkbenchRecipe r = new CachedShapelessArcaneWorkbenchRecipe(recipe);
						r.prepVisuals();
						this.arecipes.add(r);
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:19,代码来源:ShapelessArcaneWorkbenchHandler.java

示例8: loadUsageRecipes

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的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 ShapelessArcaneRecipe) {
			ShapelessArcaneRecipe recipe = (ShapelessArcaneRecipe) recipes.get(i);
			if (ThaumcraftApiHelper.isResearchComplete(Reference.PLAYER_NAME, recipe.getResearch()) || Config.cheatMode){
				for (Object o : recipe.getInput()) {
					if (o instanceof ItemStack) {
						ItemStack item = (ItemStack) o;
						if (item.isItemEqual(ingredient)) {
							if (checkDupe(recipe)) {
								CachedShapelessArcaneWorkbenchRecipe r = new CachedShapelessArcaneWorkbenchRecipe(recipe);
								r.prepVisuals();
								r.setIngredientPermutation(r.inputs,ingredient);
								this.arecipes.add(r);
							}
						}
					}
				}
			}
		}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:25,代码来源:ShapelessArcaneWorkbenchHandler.java

示例9: getArcaneRecipe

import thaumcraft.api.ThaumcraftApi; //导入方法依赖的package包/类
private static IArcaneRecipe getArcaneRecipe(String research)
{
	for (Object recipe : ThaumcraftApi.getCraftingRecipes())
	{
		if (recipe instanceof IArcaneRecipe)
		{
			if (((IArcaneRecipe)recipe).getResearch().equals(research))
			{
				return (IArcaneRecipe) recipe;
			}
		}
	}
	return null;
}
 
开发者ID:Zerokyuuni,项目名称:Ex-Aliquo,代码行数:15,代码来源:ExThaumiquo.java


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