當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。