类 ShapelessRecipe

java.lang.Object
org.bukkit.inventory.ShapelessRecipe
所有已实现的接口:
Recipe, Keyed

public class ShapelessRecipe extends Object implements Recipe, Keyed
Represents a shapeless recipe, where the arrangement of the ingredients on the crafting grid does not matter.
  • 构造器详细资料

  • 方法详细资料

    • 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.
    • getResult

      @NotNull public @NotNull ItemStack getResult()
      Get the result of this recipe.
      指定者:
      getResult 在接口中 Recipe
      返回:
      The result stack.
    • 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()
    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      从接口复制的说明: Keyed
      返回用于此对象的命名空间标识符.

      原文:Return the namespaced identifier for this object.

      指定者:
      getKey 在接口中 Keyed
      返回:
      标识此对象的 key
    • getGroup

      @NotNull public @NotNull String getGroup()
      Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
      返回:
      recipe group. An empty string denotes no group. May not be null.
    • setGroup

      public void setGroup(@NotNull @NotNull String group)
      Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
      参数:
      group - recipe group. An empty string denotes no group. May not be null.
    • getCategory

      @NotNull public @NotNull CraftingBookCategory getCategory()
      Gets the category which this recipe will appear in the recipe book under. Defaults to CraftingBookCategory.MISC if not set.
      返回:
      recipe book category
    • setCategory

      public void setCategory(@NotNull @NotNull CraftingBookCategory category)
      Sets the category which this recipe will appear in the recipe book under. Defaults to CraftingBookCategory.MISC if not set.
      参数:
      category - recipe book category