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


Java ShapelessRecipes.getRecipeOutput方法代码示例

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


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

示例1: ShapelessOreRecipe

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

    for(ItemStack ingredient : recipe.recipeItems)
    {
        Object finalObj = ingredient;
        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingredient, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:ShapelessOreRecipe.java

示例2: removeShapelessRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
public static void removeShapelessRecipe (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 ShapelessRecipes)
        {
            ShapelessRecipes recipe = (ShapelessRecipes) tmpRecipe;
            ItemStack recipeResult = recipe.getRecipeOutput();

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

示例3: ShapelessOreRecipeTFC

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

	for(ItemStack ingredient : recipe.recipeItems)
	{
		Object finalObj = ingredient;
		for(Entry<ItemStack, String> replace : replacements.entrySet())
		{
			if(OreDictionary.itemMatches(replace.getKey(), ingredient, false))
			{
				finalObj = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
		input.add(finalObj);
	}
}
 
开发者ID:Deadrik,项目名称:TFC2,代码行数:19,代码来源:ShapelessOreRecipeTFC.java

示例4: ShapelessOreRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessOreRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();

    for(ItemStack ingred : ((List<ItemStack>)recipe.recipeItems))
    {
        Object finalObj = ingred;
        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:20,代码来源:ShapelessOreRecipe.java

示例5: ShapelessBloodOrbRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
    output = recipe.getRecipeOutput();

    for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems))
    {
        Object finalObj = ingred;
        for (Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if (OreDictionary.itemMatches(replace.getKey(), ingred, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
开发者ID:amadornes,项目名称:Framez,代码行数:20,代码来源:ShapelessBloodOrbRecipe.java

示例6: ShapelessOreRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessOreRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
{
    vanillaRecipe = recipe; // Cauldron - bukkit compatibility
    output = recipe.getRecipeOutput();

    for(ItemStack ingred : ((List<ItemStack>)recipe.recipeItems))
    {
        Object finalObj = ingred;
        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:21,代码来源:ShapelessOreRecipe.java

示例7: ShapelessOreRecipe

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

    for(ItemStack ingred : ((List<ItemStack>)recipe.recipeItems))
    {
        Object finalObj = ingred;
        for(Entry<ItemStack, String> replace : replacements.entrySet())
        {
            if(OreDictionary.itemMatches(replace.getKey(), ingred, false))
            {
                finalObj = OreDictionary.getOres(replace.getValue());
                break;
            }
        }
        input.add(finalObj);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:ShapelessOreRecipe.java

示例8: removeShapelessRecipe

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

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

示例9: shapelessRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
    if (recipe.recipeItems == null) //because some mod subclasses actually do this
    {
        return null;
    }

    return new CachedShapelessRecipe(recipe.recipeItems, recipe.getRecipeOutput());
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:9,代码来源:ShapelessRecipeHandler.java

示例10: ShapelessBloodOrbRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
ShapelessBloodOrbRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements) {
	output = recipe.getRecipeOutput();

	for (ItemStack ingred : ((List<ItemStack>) recipe.recipeItems)) {
		Object finalObj = ingred;
		for (Entry<ItemStack, String> replace : replacements.entrySet()) {
			if (OreDictionary.itemMatches(replace.getKey(), ingred, false)) {
				finalObj = OreDictionary.getOres(replace.getValue());
				break;
			}
		}
		input.add(finalObj);
	}
}
 
开发者ID:Lomeli12,项目名称:MagicalRings,代码行数:16,代码来源:ShapelessBloodOrbRecipe.java

示例11: shapelessRecipe

import net.minecraft.item.crafting.ShapelessRecipes; //导入方法依赖的package包/类
private CachedShapelessRecipe shapelessRecipe(ShapelessRecipes recipe) {
    if(recipe.recipeItems == null) //because some mod subclasses actually do this
        return null;

    return new CachedShapelessRecipe(recipe.recipeItems, recipe.getRecipeOutput());
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:7,代码来源:ShapelessRecipeHandler.java


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