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