本文整理匯總了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;
}
}
}
}
示例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;
}
}
}
}
示例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;
}
}
}
}
示例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--);
}
}
}
}
示例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;
}
}
}
}
示例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;
}
}
}
}
示例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);
}
示例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;
}
}
}
}
示例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--);
}
}
}
}
示例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;
}
}
}
}
示例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;
}
}
}
}
示例12: MicroblockCachedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //導入方法依賴的package包/類
public MicroblockCachedRecipe(final ShapedRecipes irecipe) {
this(irecipe.recipeWidth, irecipe.recipeHeight, irecipe.recipeItems, irecipe.getRecipeOutput());
}
示例13: CachedShapedRecipe
import net.minecraft.item.crafting.ShapedRecipes; //導入方法依賴的package包/類
public CachedShapedRecipe(ShapedRecipes recipe) {
this(recipe.recipeWidth, recipe.recipeHeight, recipe.recipeItems, recipe.getRecipeOutput());
}
示例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);
}