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


Java ShapelessArcaneRecipe类代码示例

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


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

示例1: loadCraftingRecipes

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的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

示例2: loadUsageRecipes

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的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

示例3: addShapelessArcaneCraftingRecipe

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
/**
 * @param research the research key required for this recipe to work. Leave blank if it will work without research
 * @param result the recipe output
 * @param aspects the vis cost per aspect
 * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive.
 */
public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object ... recipe)
   {
	ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe);
       craftingRecipes.add(r);
	return r;
   }
 
开发者ID:Brandomine,项目名称:Augury,代码行数:13,代码来源:ThaumcraftApi.java

示例4: scan

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
@Override
public void scan() {
    for (IRecipe recipe : (List<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
        VanillaStackWrapper stackWrapper = new VanillaStackWrapper(recipe.getRecipeOutput());
        if (recipe instanceof ShapedArcaneRecipe) {
            addRecipe(stackWrapper, new CachedRecipe(((ShapedArcaneRecipe) recipe).getInput()).setResult(new VanillaStackWrapper(recipe.getRecipeOutput())));
        } else if (recipe instanceof ShapelessArcaneRecipe) {
            addRecipe(stackWrapper, new CachedRecipe(((ShapelessArcaneRecipe) recipe).getInput()).setResult(new VanillaStackWrapper(recipe.getRecipeOutput())));
        }
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:12,代码来源:ThaumcraftCraftingScanner.java

示例5: checkDupe

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

示例6: CachedShapelessArcaneWorkbenchRecipe

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
public CachedShapelessArcaneWorkbenchRecipe(ShapelessArcaneRecipe recipe){//Wow that's a long class name!
	this.aspects = recipe.getAspects();
	this.output = new PositionedStack(recipe.getRecipeOutput(), outCoords[0], outCoords[1]);
	this.recipe = recipe;
	ArrayList<Object> input = recipe.getInput();
	int i = 0;
	for (Object inputItem : input){
		//if (inputItem != null){
		switch (i) {
			case 0:
				if (inputItem != null) {

					this.inputs.add(new PositionedStack(inputItem, inCoords[0], inCoords[0]));
				}
				break;
			case 1:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[1], inCoords[0]));
				}
				break;
			case 2:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[2], inCoords[0]));

				}
				break;
			case 3:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[0], inCoords[1]));

				}
				break;
			case 4:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[1], inCoords[1]));

				}
				break;
			case 5:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[2], inCoords[1]));

				}
				break;
			case 6:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[0], inCoords[2]));

				}
				break;
			case 7:
				if (inputItem != null) {
					this.inputs.add(new PositionedStack(inputItem, inCoords[1], inCoords[2]));

				}
				break;
			case 8:
				if (inputItem != null) {

					this.inputs.add(new PositionedStack(inputItem, inCoords[2], inCoords[2]));

				}
				break;
			}
		i++;
		//}
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:69,代码来源:ShapelessArcaneWorkbenchHandler.java

示例7: addShapelessArcaneCraftingRecipe

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
/**
 * @param research
 *        the research key required for this recipe to work. Leave blank if it will work without
 *        research
 * @param result
 *        the recipe output
 * @param aspects
 *        the vis cost per aspect
 * @param recipe
 *        The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks
 *        are NBT sensitive.
 */
public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) {
	ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe);
	craftingRecipes.add(r);
	return r;
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:18,代码来源:ThaumcraftApi.java

示例8: addShapelessArcaneCraftingRecipe

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
/**
 * @param research the research key required for this recipe to work. Leave blank if it will work without research
 * @param result the recipe output
 * @param aspects the vis cost per aspect
 * @param recipe The recipe. Format is exactly the same as vanilla shapeless recipes. Input itemstacks are NBT sensitive.
 */
public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) {
    ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe);
    craftingRecipes.add(r);
    return r;
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:12,代码来源:ThaumcraftApi.java

示例9: addShapelessArcaneCraftingRecipe

import thaumcraft.api.crafting.ShapelessArcaneRecipe; //导入依赖的package包/类
/**
 * @param research
 *            the research key required for this recipe to work. Leave blank
 *            if it will work without research
 * @param result
 *            the recipe output
 * @param aspects
 *            the vis cost per aspect
 * @param recipe
 *            The recipe. Format is exactly the same as vanilla shapeless
 *            recipes. Input itemstacks are NBT sensitive.
 */
public static ShapelessArcaneRecipe addShapelessArcaneCraftingRecipe(String research, ItemStack result, AspectList aspects, Object... recipe) {
	ShapelessArcaneRecipe r = new ShapelessArcaneRecipe(research, result, aspects, recipe);
	craftingRecipes.add(r);
	return r;
}
 
开发者ID:jaredlll08,项目名称:MysticalTrinkets,代码行数:18,代码来源:ThaumcraftApi.java


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