Java 类org.bukkit.inventory.FurnaceRecipe 实例源码

项目:Carbon-2    文件:Injector.java   
public void registerRecipes() {
    Bukkit.resetRecipes();
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.BEETROOT_SOUP)).shape(new String[] {"rrr", "rrr", " b "}).setIngredient('r', MaterialList.BEETROOT).setIngredient('b', org.bukkit.Material.BOWL));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.END_BRICKS)).shape(new String[] {"ee", "ee"}).setIngredient('e', org.bukkit.Material.ENDER_STONE));

    //Purpur block recipes
    addRecipe(new FurnaceRecipe(new ItemStack(MaterialList.CHORUS_FRUIT_POPPED), MaterialList.CHORUS_FRUIT));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_BLOCK, 4)).shape(new String[] {"pp", "pp"}).setIngredient('p', MaterialList.CHORUS_FRUIT_POPPED));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_STAIRS, 4)).shape(new String[] {"p  ", "pp ", "ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_STAIRS, 4)).shape(new String[] {"  p", " pp", "ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_SLAB, 6)).shape(new String[] {"ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_PILLAR)).shape(new String[] {"s", "s"}).setIngredient('s', MaterialList.PURPUR_SLAB));

    //Arrows
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.SPECTRAL_ARROW, 2)).shape(new String[] {" d ", "dad", " d "}).setIngredient('d', org.bukkit.Material.GLOWSTONE_DUST).setIngredient('a', org.bukkit.Material.ARROW));
}
项目:Carbon-2    文件:Injector.java   
public void registerRecipes() {
    Bukkit.resetRecipes();
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.BEETROOT_SOUP)).shape(new String[] {"rrr", "rrr", " b "}).setIngredient('r', MaterialList.BEETROOT).setIngredient('b', org.bukkit.Material.BOWL));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.END_BRICKS)).shape(new String[] {"ee", "ee"}).setIngredient('e', org.bukkit.Material.ENDER_STONE));

    //Purpur block recipes
    addRecipe(new FurnaceRecipe(new ItemStack(MaterialList.CHORUS_FRUIT_POPPED), MaterialList.CHORUS_FRUIT));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_BLOCK, 4)).shape(new String[] {"pp", "pp"}).setIngredient('p', MaterialList.CHORUS_FRUIT_POPPED));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_STAIRS, 4)).shape(new String[] {"p  ", "pp ", "ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_STAIRS, 4)).shape(new String[] {"  p", " pp", "ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_SLAB, 6)).shape(new String[] {"ppp"}).setIngredient('p', MaterialList.PURPUR_BLOCK));
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.PURPUR_PILLAR)).shape(new String[] {"s", "s"}).setIngredient('s', MaterialList.PURPUR_SLAB));

    //Arrows
    addRecipe(new ShapedRecipe(new ItemStack(MaterialList.SPECTRAL_ARROW, 2)).shape(new String[] {" d ", "dad", " d "}).setIngredient('d', org.bukkit.Material.GLOWSTONE_DUST).setIngredient('a', org.bukkit.Material.ARROW));
}
项目:sensibletoolbox    文件:RecipeUtil.java   
public static void setupRecipes() {
    for (String key : SensibleToolbox.getItemRegistry().getItemIds()) {
        // add custom workbench recipes
        BaseSTBItem item = SensibleToolbox.getItemRegistry().getItemById(key);
        Recipe r = item.getRecipe();
        if (r != null) {
            Bukkit.addRecipe(r);
        }
        for (Recipe r2 : item.getExtraRecipes()) {
            Bukkit.addRecipe(r2);
        }

        // add custom furnace recipes
        ItemStack stack = item.getSmeltingResult();
        if (stack != null) {
            Bukkit.addRecipe(new FurnaceRecipe(stack, item.getMaterialData()));
            recordReverseSmelt(stack, item.toItemStack());
        }

        // add custom processing recipes for any machine items
        if (item instanceof BaseSTBMachine) {
            ((BaseSTBMachine) item).addCustomRecipes(CustomRecipeManager.getManager());
        }
    }
}
项目:sensibletoolbox    文件:Smelter.java   
@Override
public void addCustomRecipes(CustomRecipeManager crm) {
    // add a corresponding smelter recipe for every known vanilla furnace recipe
    Iterator<Recipe> iter = Bukkit.recipeIterator();
    while (iter.hasNext()) {
        Recipe r = iter.next();
        if (r instanceof FurnaceRecipe) {
            FurnaceRecipe fr = (FurnaceRecipe) r;
            if (RecipeUtil.isVanillaSmelt(fr.getInput().getType())) {
                crm.addCustomRecipe(new SimpleCustomRecipe(this, fr.getInput(), fr.getResult(), getProcessingTime(fr.getInput())));
            }
        }
    }

    // add a processing recipe for any STB item which reports itself as smeltable
    for (String key : SensibleToolbox.getItemRegistry().getItemIds()) {
        BaseSTBItem item = SensibleToolbox.getItemRegistry().getItemById(key);
        if (item.getSmeltingResult() != null) {
            ItemStack stack = item.toItemStack();
            crm.addCustomRecipe(new SimpleCustomRecipe(this, stack, item.getSmeltingResult(), getProcessingTime(stack)));
        }
    }
}
项目:ProjectAres    文件:CraftingModule.java   
public Recipe parseSmeltingRecipe(MapModuleContext context, Element elRecipe) throws InvalidXMLException {
    MaterialPattern ingredient = XMLUtils.parseMaterialPattern(XMLUtils.getRequiredUniqueChild(elRecipe, "ingredient", "i"));
    ItemStack result = parseRecipeResult(context, elRecipe);
    if(ingredient.dataMatters()) {
        return new FurnaceRecipe(result, ingredient.getMaterialData());
    } else {
        return new FurnaceRecipe(result, ingredient.getMaterial());
    }
}
项目:CS-CoreLib    文件:RecipeCalculator.java   
public static ItemStack getSmeltedOutput(Material type) {
    ItemStack result = null;
    Iterator<Recipe> iter = Bukkit.recipeIterator();
    while (iter.hasNext()) {
       Recipe recipe = iter.next();
       if (!(recipe instanceof FurnaceRecipe)) continue;
       if (((FurnaceRecipe) recipe).getInput().getType() != type) continue;
       result = recipe.getResult();
       break;
    }

    return result;
}
项目:craftinomicon    文件:RecipeAcceptor.java   
public static <T> T accept(Recipe recipe, RecipeVisitor<T> visitor) {
    if (recipe instanceof ShapedRecipe) {
        ShapedRecipe shapedRecipe = (ShapedRecipe) recipe;
        return visitor.visit(shapedRecipe);
    } else if (recipe instanceof ShapelessRecipe) {
        ShapelessRecipe shapelessRecipe = (ShapelessRecipe) recipe;
        return visitor.visit(shapelessRecipe);
    } else if (recipe instanceof FurnaceRecipe) {
        FurnaceRecipe furnaceRecipe = (FurnaceRecipe) recipe;
        return visitor.visit(furnaceRecipe);
    }
    return visitor.visitOther(recipe);
}
项目:Slimefun4    文件:ElectricFurnace.java   
@Override
public void registerDefaultRecipes() {
    Iterator<Recipe> iterator = Bukkit.recipeIterator();
    while (iterator.hasNext()) {
        Recipe r = iterator.next();
        if (r instanceof FurnaceRecipe) {
            registerRecipe(4, new ItemStack[] {((FurnaceRecipe) r).getInput()}, new ItemStack[] {r.getResult()});
        }
    }
}
项目:StarQuestCode    文件:BetterRecipes.java   
static void addAllRecipes (FileConfiguration config) {

    if (config.getBoolean("allowFleshSmelt")) {
        Bukkit.addRecipe(new FurnaceRecipe(new ItemStack(Material.LEATHER),Material.ROTTEN_FLESH));
    }

    if (config.getBoolean("allowJerky")){
        ShapelessRecipe jerky = new ShapelessRecipe(new ItemStack(Material.RAW_BEEF));
        jerky.addIngredient(2, Material.ROTTEN_FLESH);
        jerky.addIngredient(Material.SUGAR);
        Bukkit.addRecipe(jerky);        
    }
}
项目:StarQuestCode    文件:BetterRecipes.java   
static void removeAllRecipes() {
    Recipe recipe;

    // Check iterator for any of our recipes, if so, remove them
    Iterator<Recipe> iter = Bukkit.recipeIterator();
    while (iter.hasNext()) {
        recipe = iter.next();

        // Check if this Recipe is one of the ones we are responsible for
        // First, Furnace Recipes
        try {
            if (recipe instanceof FurnaceRecipe) {
                if ((Material.LEATHER == recipe.getResult().getType()) &&
                    (Material.ROTTEN_FLESH == ((FurnaceRecipe) recipe).getInput().getType())){
                        iter.remove();
                }
            }

            // Check for our Shapeless Recipes
            if (recipe instanceof ShapelessRecipe) {
                if (Material.RAW_BEEF == recipe.getResult().getType()) {
                    List<ItemStack> ingredients = ((ShapelessRecipe) recipe).getIngredientList();
                    if (3 == ingredients.size() &&
                        ingredients.contains(new ItemStack(Material.ROTTEN_FLESH)) &&
                        ingredients.contains(new ItemStack(Material.SUGAR))) {
                        iter.remove();
                    }
                }
            }
        }
        catch (NullPointerException e) {
            System.out.print("[ERROR]: Failed to process Recipe iterator");
            e.printStackTrace();
            // Don't rethrow, attempt recovery
        }
    }
}
项目:StarQuestCode    文件:Fuel.java   
private static Set<Material> getBurnableMaterials() {
    Set<Material> burnables = new HashSet<Material>(24);
    for (Iterator<Recipe> it = MachinaCore.plugin.getServer().recipeIterator(); it.hasNext();) {
        Recipe recipe = it.next();
        if (recipe instanceof FurnaceRecipe) {
            burnables.add(((FurnaceRecipe) recipe).getInput().getType());
        }
    }
    return burnables;
}
项目:McMMOPlus    文件:ItemUtils.java   
public static boolean isSmelted(ItemStack item) {
    if (item == null) {
        return false;
    }

    for (Recipe recipe : mcMMO.p.getServer().getRecipesFor(item)) {
        if (recipe instanceof FurnaceRecipe) {
            return MaterialUtils.isOre(((FurnaceRecipe) recipe).getInput().getData());
        }
    }

    return false;
}
项目:sensibletoolbox    文件:RecipeUtil.java   
public static void findVanillaFurnaceMaterials() {
    Iterator<Recipe> iter = Bukkit.recipeIterator();
    while (iter.hasNext()) {
        Recipe r = iter.next();
        if (r instanceof FurnaceRecipe) {
            Material mat = ((FurnaceRecipe) r).getInput().getType();
            vanillaSmelts.add(mat);
            recordReverseSmelt(r.getResult(), ((FurnaceRecipe) r).getInput());
        }
    }
}
项目:Uranium    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:ThermosRebased    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Thermos    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:KCauldron    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:CauldronGit    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Cauldron-Old    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Cauldron-Reloaded    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:FFoKC    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:CraftBukkit    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Craftbukkit    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Almura-Server    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Tweakkit-Server    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:DDCustomPlugin    文件:CustomRecipies.java   
public void enable() {
    log("FleshToLeather:");
    plugin.getServer().addRecipe(new FurnaceRecipe(new ItemStack(Material.LEATHER), Material.ROTTEN_FLESH));
    log("Enabled");
}
项目:Cauldron    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
public FurnaceRecipe(ItemStack result, Material source) {
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
public FurnaceRecipe(ItemStack result, MaterialData source) {
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
@Deprecated public FurnaceRecipe(ItemStack result, Material source, int data) {
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
public FurnaceRecipe setInput(MaterialData input) {
    return null;
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
public FurnaceRecipe setInput(Material input) {
    return null;
}
项目:BedrockAPI    文件:FurnaceRecipe.java   
@Deprecated public FurnaceRecipe setInput(Material input, int data) {
    return null;
}
项目:CardinalPGM    文件:SmeltRecipe.java   
public SmeltRecipe(ItemStack result, MaterialData source) {
    setRecipe(new FurnaceRecipe(result, source));
}
项目:SpigotSource    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:Craft-city    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:MCPBukkit    文件:CraftFurnaceRecipe.java   
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
    if (recipe instanceof CraftFurnaceRecipe) {
        return (CraftFurnaceRecipe) recipe;
    }
    return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
项目:craftinomicon    文件:RecipeVisitor.java   
T visit(FurnaceRecipe furnaceRecipe);