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


Java ShapedRecipes.getRecipeOutput方法代码示例

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


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

示例1: ShapedOreRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();
    width = recipe.recipeWidth;
    height = recipe.recipeHeight;

    input = new Object[recipe.recipeItems.length];

    for(int i = 0; i < input.length; i++)
    {
        ItemStack ingredient = recipe.recipeItems[i];

        if(ingredient == null) continue;

        input[i] = recipe.recipeItems[i];

        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingredient, true))
            {
                input[i] = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:ShapedOreRecipe.java

示例2: ShapedOreCrystalRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreCrystalRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();
    width = recipe.recipeWidth;
    height = recipe.recipeHeight;

    input = new Object[recipe.recipeItems.length];

    for(int i = 0; i < input.length; i++)
    {
        ItemStack ingred = recipe.recipeItems[i];

        if(ItemStackTools.isEmpty(ingred)) continue;

        input[i] = recipe.recipeItems[i];

        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
            {
                input[i] = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
    }
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:27,代码来源:ShapedOreCrystalRecipe.java

示例3: RoryShapedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
RoryShapedRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements) {
	output = recipe.getRecipeOutput();
	width = recipe.recipeWidth;
	height = recipe.recipeHeight;

	input = new Object[recipe.recipeItems.length];

	for (int i = 0; i < input.length; i++) {
		ItemStack ingred = recipe.recipeItems[i];
		if (ingred == null) continue;
		input[i] = recipe.recipeItems[i];
		for (Entry<ItemStack, String> replace : replacements.entrySet()) {
			if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) {
				input[i] = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
	}
}
 
开发者ID:roryclaasen,项目名称:RorysMod,代码行数:20,代码来源:RoryShapedRecipe.java

示例4: removeShapedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public static void removeShapedRecipe (ItemStack resultItem)
{
    Preconditions.checkNotNull(resultItem);
    List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
    for (int i = 0; i < recipes.size(); i++)
    {
        IRecipe tmpRecipe = recipes.get(i);
        if (tmpRecipe instanceof ShapedRecipes)
        {
            ShapedRecipes recipe = (ShapedRecipes) tmpRecipe;
            ItemStack recipeResult = recipe.getRecipeOutput();

            if (ItemStack.areItemStacksEqual(resultItem, recipeResult))
            {
                recipes.remove(i--);
            }
        }
    }
}
 
开发者ID:dmaster8,项目名称:DMTweaks,代码行数:20,代码来源:RecipeRemover.java

示例5: ShapedOreRecipeTFC

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipeTFC(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
	output = recipe.getRecipeOutput();
	width = recipe.recipeWidth;
	height = recipe.recipeHeight;

	input = new ArrayList<Object>(recipe.recipeItems.length);

	for(int i = 0; i < recipe.recipeItems.length; i++)
	{
		ItemStack ingredient = recipe.recipeItems[i];

		if(ingredient == null) continue;

		input.add(recipe.recipeItems[i]);

		for(Entry<ItemStack, String> replace : replacements.entrySet())
		{
			if(OreDictionary.itemMatches(replace.getKey(), ingredient, true))
			{
				input.set(i, OreDictionary.getOres(replace.getValue()));
				break;
			}
		}
	}
}
 
开发者ID:Deadrik,项目名称:TFC2,代码行数:27,代码来源:ShapedOreRecipeTFC.java

示例6: ShapedOreRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();
    width = recipe.recipeWidth;
    height = recipe.recipeHeight;

    input = new Object[recipe.recipeItems.length];

    for(int i = 0; i < input.length; i++)
    {
        ItemStack ingred = recipe.recipeItems[i];

        if(ingred == null) continue;

        input[i] = recipe.recipeItems[i];

        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
            {
                input[i] = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
    }
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:27,代码来源:ShapedOreRecipe.java

示例7: rem

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public void rem(){
    ItemStack test = new ItemStack(Items.iron_ingot);
    @SuppressWarnings("unchecked")
    List<IRecipe> allRecipes = CraftingManager.getInstance().getRecipeList();
    List<IRecipe> recipesToRemove = new ArrayList<IRecipe>();
    List<IRecipe> recipesToAdd = new ArrayList<IRecipe>();

    // Search vanilla recipes for recipes to replace
    for(Object obj : allRecipes)
    {
        if(obj instanceof ShapedRecipes)
        {
            ShapedRecipes recipe = (ShapedRecipes)obj;
            ItemStack output = recipe.getRecipeOutput();
            if(output == test)
            {
                recipesToRemove.add(recipe);
                ItemStack[] t = recipe.recipeItems;
                recipesToAdd.add(new ShapedOreRecipe(test, t));
            }
        }
    }

    allRecipes.removeAll(recipesToRemove);
    allRecipes.addAll(recipesToAdd);
}
 
开发者ID:PhoenixTeamMC,项目名称:MTAddon,代码行数:27,代码来源:OreDict.java

示例8: ShapedBloodOrbRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements) {
	output = recipe.getRecipeOutput();
	width = recipe.recipeWidth;
	height = recipe.recipeHeight;

	input = new Object[recipe.recipeItems.length];

	for (int i = 0; i < input.length; i++) {
		ItemStack ingred = recipe.recipeItems[i];

		if (ingred == null)
			continue;

		input[i] = recipe.recipeItems[i];

		for (Entry<ItemStack, String> replace : replacements.entrySet()) {
			if (OreDictionary.itemMatches(replace.getKey(), ingred, true)) {
				input[i] = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
	}
}
 
开发者ID:Lomeli12,项目名称:MagicalRings,代码行数:24,代码来源:ShapedBloodOrbRecipe.java

示例9: removeShapedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public static void removeShapedRecipe(ItemStack resultItem) {
	List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
	for (int i = 0; i < recipes.size(); i++) {
		IRecipe tmpRecipe = recipes.get(i);
		if (tmpRecipe instanceof ShapedRecipes) {
			ShapedRecipes recipe = (ShapedRecipes) tmpRecipe;
			ItemStack recipeResult = recipe.getRecipeOutput();

			if (ItemStack.areItemStacksEqual(resultItem, recipeResult)) {
				recipes.remove(i--);
			}
		}
	}
}
 
开发者ID:WolfieWaffle,项目名称:Survivalist-Lighting,代码行数:15,代码来源:RecipeRemover.java

示例10: ShapedBloodOrbRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedBloodOrbRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();
    width = recipe.recipeWidth;
    height = recipe.recipeHeight;

    input = new Object[recipe.recipeItems.length];

    for (int i = 0; i < input.length; i++)
    {
        ItemStack ingred = recipe.recipeItems[i];

        if (ingred == null)
            continue;

        input[i] = recipe.recipeItems[i];

        for (Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if (OreDictionary.itemMatches(replace.getKey(), ingred, true))
            {
                input[i] = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
    }
}
 
开发者ID:amadornes,项目名称:Framez,代码行数:28,代码来源:ShapedBloodOrbRecipe.java

示例11: ShapedOreRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
{
    vanillaRecipe = recipe; // Cauldron - bukkit compatibility
    output = recipe.getRecipeOutput();
    width = recipe.recipeWidth;
    height = recipe.recipeHeight;

    input = new Object[recipe.recipeItems.length];

    for(int i = 0; i < input.length; i++)
    {
        ItemStack ingred = recipe.recipeItems[i];

        if(ingred == null) continue;

        input[i] = recipe.recipeItems[i];

        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, true))
            {
                input[i] = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:28,代码来源:ShapedOreRecipe.java

示例12: MicroblockCachedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public MicroblockCachedRecipe(final ShapedRecipes irecipe) {
    this(irecipe.recipeWidth, irecipe.recipeHeight, irecipe.recipeItems, irecipe.getRecipeOutput());
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:4,代码来源:FMPMicroBlocksHandler.java

示例13: CachedShapedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public CachedShapedRecipe(ShapedRecipes recipe) {
    this(recipe.recipeWidth, recipe.recipeHeight, recipe.recipeItems, recipe.getRecipeOutput());
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:4,代码来源:ShapedRecipeHandler.java

示例14: CachedRollingMachineShapedRecipe

import net.minecraft.item.crafting.ShapedRecipes; //导入方法依赖的package包/类
public CachedRollingMachineShapedRecipe(ShapedRecipes recipe, boolean genPerms) {
    this(recipe.recipeWidth, recipe.recipeHeight, recipe.recipeItems, recipe.getRecipeOutput(), genPerms);
}
 
开发者ID:Tonius,项目名称:NEI-Integration,代码行数:4,代码来源:RecipeHandlerRollingMachineShaped.java


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