程序包 org.bukkit.inventory

# 类 ShapelessRecipe

java.lang.Object
org.bukkit.inventory.CraftingRecipe
org.bukkit.inventory.ShapelessRecipe

所有已实现的接口:
  `Recipe`, `Keyed`

public class ShapelessRecipe extends CraftingRecipe
Represents a shapeless recipe, where the arrangement of the ingredients on the crafting grid does not matter.

- ## 构造器概要

  构造器
  构造器
  说明
  `ShapelessRecipe(@NotNull ItemStack result)`
  已过时。
  `ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)`
  Create a shapeless recipe to craft the specified ItemStack.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull ShapelessRecipe`
  `addIngredient(int count, @NotNull Material ingredient)`
  Adds multiples of the specified ingredient.
  `@NotNull ShapelessRecipe`
  `addIngredient(int count, @NotNull MaterialData ingredient)`
  Adds multiples of the specified ingredient.
  `@NotNull ShapelessRecipe`
  `addIngredient(int count, @NotNull Material ingredient, int rawdata)`
  已过时。
  Magic value
  `@NotNull ShapelessRecipe`
  `addIngredient(@NotNull RecipeChoice ingredient)`
  `@NotNull ShapelessRecipe`
  `addIngredient(@NotNull Material ingredient)`
  Adds the specified ingredient.
  `@NotNull ShapelessRecipe`
  `addIngredient(@NotNull MaterialData ingredient)`
  Adds the specified ingredient.
  `@NotNull ShapelessRecipe`
  `addIngredient(@NotNull Material ingredient, int rawdata)`
  已过时。
  Magic value
  `@NotNull List<RecipeChoice>`
  `getChoiceList()`
  `@NotNull List<ItemStack>`
  `getIngredientList()`
  Get the list of ingredients used for this recipe.
  `@NotNull ShapelessRecipe`
  `removeIngredient(int count, @NotNull Material ingredient)`
  Removes multiple instances of an ingredient from the list.
  `@NotNull ShapelessRecipe`
  `removeIngredient(int count, @NotNull MaterialData ingredient)`
  Removes multiple instances of an ingredient from the list.
  `@NotNull ShapelessRecipe`
  `removeIngredient(int count, @NotNull Material ingredient, int rawdata)`
  已过时。
  Magic value
  `@NotNull ShapelessRecipe`
  `removeIngredient(@NotNull RecipeChoice ingredient)`
  Removes an ingredient from the list.
  `@NotNull ShapelessRecipe`
  `removeIngredient(@NotNull Material ingredient)`
  Removes an ingredient from the list.
  `@NotNull ShapelessRecipe`
  `removeIngredient(@NotNull MaterialData ingredient)`
  Removes an ingredient from the list.
  `@NotNull ShapelessRecipe`
  `removeIngredient(@NotNull Material ingredient, int rawdata)`
  已过时。
  Magic value

  ### 从类继承的方法 org.bukkit.inventory.CraftingRecipe

  `getCategory, getGroup, getKey, getResult, setCategory, setGroup`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### ShapelessRecipe

    @Deprecated public ShapelessRecipe(@NotNull @NotNull ItemStack result)
    已过时。

  - ### ShapelessRecipe

    public ShapelessRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result)
    Create a shapeless recipe to craft the specified ItemStack. The constructor merely determines the result and type; to set the actual recipe, you'll need to call the appropriate methods.
    参数:
      `key` - the unique recipe key
      `result` - The item you want the recipe to create.
    另请参阅:
      - `addIngredient(Material)`
      - `addIngredient(MaterialData)`
      - `addIngredient(Material,int)`
      - `addIngredient(int,Material)`
      - `addIngredient(int,MaterialData)`
      - `addIngredient(int,Material,int)`

- ## 方法详细资料

  - ### addIngredient

    @NotNull public @NotNull ShapelessRecipe addIngredient(@NotNull @NotNull MaterialData ingredient)
    Adds the specified ingredient.
    参数:
      `ingredient` - The ingredient to add.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @NotNull public @NotNull ShapelessRecipe addIngredient(@NotNull @NotNull Material ingredient)
    Adds the specified ingredient.
    参数:
      `ingredient` - The ingredient to add.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @Deprecated @NotNull public @NotNull ShapelessRecipe addIngredient(@NotNull @NotNull Material ingredient, int rawdata)
    已过时。
    Magic value
    Adds the specified ingredient.
    参数:
      `ingredient` - The ingredient to add.
      `rawdata` - The data value, or -1 to allow any data value.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull MaterialData ingredient)
    Adds multiples of the specified ingredient.
    参数:
      `count` - How many to add (can't be more than 9!)
      `ingredient` - The ingredient to add.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull Material ingredient)
    Adds multiples of the specified ingredient.
    参数:
      `count` - How many to add (can't be more than 9!)
      `ingredient` - The ingredient to add.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @Deprecated @NotNull public @NotNull ShapelessRecipe addIngredient(int count, @NotNull @NotNull Material ingredient, int rawdata)
    已过时。
    Magic value
    Adds multiples of the specified ingredient.
    参数:
      `count` - How many to add (can't be more than 9!)
      `ingredient` - The ingredient to add.
      `rawdata` - The data value, or -1 to allow any data value.
    返回:
      The changed recipe, so you can chain calls.

  - ### addIngredient

    @NotNull public @NotNull ShapelessRecipe addIngredient(@NotNull @NotNull RecipeChoice ingredient)

  - ### removeIngredient

    @NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull RecipeChoice ingredient)
    Removes an ingredient from the list.
    参数:
      `ingredient` - The ingredient to remove
    返回:
      The changed recipe.

  - ### removeIngredient

    @NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull Material ingredient)
    Removes an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. Only removes exact matches, with a data value of 0.
    参数:
      `ingredient` - The ingredient to remove
    返回:
      The changed recipe.

  - ### removeIngredient

    @NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull MaterialData ingredient)
    Removes an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.
    参数:
      `ingredient` - The ingredient to remove
    返回:
      The changed recipe.

  - ### removeIngredient

    @NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull Material ingredient)
    Removes multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. Only removes exact matches, with a data value of 0.
    参数:
      `count` - The number of copies to remove.
      `ingredient` - The ingredient to remove
    返回:
      The changed recipe.

  - ### removeIngredient

    @NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull MaterialData ingredient)
    Removes multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.
    参数:
      `count` - The number of copies to remove.
      `ingredient` - The ingredient to remove.
    返回:
      The changed recipe.

  - ### removeIngredient

    @Deprecated @NotNull public @NotNull ShapelessRecipe removeIngredient(@NotNull @NotNull Material ingredient, int rawdata)
    已过时。
    Magic value
    Removes an ingredient from the list. If the ingredient occurs multiple times, only one instance of it is removed. If the data value is -1, only ingredients with a -1 data value will be removed.
    参数:
      `ingredient` - The ingredient to remove
      `rawdata` - The data value;
    返回:
      The changed recipe.

  - ### removeIngredient

    @Deprecated @NotNull public @NotNull ShapelessRecipe removeIngredient(int count, @NotNull @NotNull Material ingredient, int rawdata)
    已过时。
    Magic value
    Removes multiple instances of an ingredient from the list. If there are less instances then specified, all will be removed. If the data value is -1, only ingredients with a -1 data value will be removed.
    参数:
      `count` - The number of copies to remove.
      `ingredient` - The ingredient to remove.
      `rawdata` - The data value.
    返回:
      The changed recipe.

  - ### getIngredientList

    @NotNull public @NotNull List<ItemStack> getIngredientList()
    Get the list of ingredients used for this recipe.
    返回:
      The input list

  - ### getChoiceList

    @NotNull public @NotNull List<RecipeChoice> getChoiceList()