# 接口的使用
org.bukkit.inventory.RecipeChoice

使用RecipeChoice的程序包
程序包
说明
org.bukkit.inventory
参与操作玩家物品栏和物品交互的类.

- ## org.bukkit.inventory中RecipeChoice的使用

  实现RecipeChoice的org.bukkit.inventory中的类
  修饰符和类型
  类
  说明
  `static class`
  `RecipeChoice.ExactChoice`
  Represents a choice that will be valid only if one of the stacks is exactly matched (aside from stack size).
  `static class`
  `RecipeChoice.MaterialChoice`
  Represents a choice of multiple matching Materials.
  返回RecipeChoice的org.bukkit.inventory中的方法
  修饰符和类型
  方法
  说明
  `@NotNull RecipeChoice`
  RecipeChoice.`clone()`
  `@NotNull RecipeChoice`
  SmithingRecipe.`getAddition()`
  Get the addition recipe item.
  `@NotNull RecipeChoice`
  SmithingRecipe.`getBase()`
  Get the base recipe item.
  `@NotNull RecipeChoice`
  CookingRecipe.`getInputChoice()`
  Get the input choice.
  `@NotNull RecipeChoice`
  StonecuttingRecipe.`getInputChoice()`
  Get the input choice.
  `@NotNull RecipeChoice`
  SmithingTransformRecipe.`getTemplate()`
  Get the template recipe item.
  `@NotNull RecipeChoice`
  SmithingTrimRecipe.`getTemplate()`
  Get the template recipe item.
  返回变量类型为RecipeChoice的类型的org.bukkit.inventory中的方法
  修饰符和类型
  方法
  说明
  `@NotNull List<RecipeChoice>`
  ShapelessRecipe.`getChoiceList()`
  `@NotNull Map<Character,RecipeChoice>`
  ShapedRecipe.`getChoiceMap()`
  Get a copy of the choice map.
  参数类型为RecipeChoice的org.bukkit.inventory中的方法
  修饰符和类型
  方法
  说明
  `@NotNull ShapelessRecipe`
  ShapelessRecipe.`addIngredient(@NotNull RecipeChoice ingredient)`
  `@NotNull ShapelessRecipe`
  ShapelessRecipe.`removeIngredient(@NotNull RecipeChoice ingredient)`
  Removes an ingredient from the list.
  `@NotNull ShapedRecipe`
  ShapedRecipe.`setIngredient(char key, @NotNull RecipeChoice ingredient)`
  Sets the `RecipeChoice` that a character in the recipe shape refers to.
  `T`
  CookingRecipe.`setInputChoice(@NotNull RecipeChoice input)`
  Sets the input of this cooking recipe.
  `@NotNull FurnaceRecipe`
  FurnaceRecipe.`setInputChoice(@NotNull RecipeChoice input)`
  `@NotNull StonecuttingRecipe`
  StonecuttingRecipe.`setInputChoice(@NotNull RecipeChoice input)`
  Sets the input of this cooking recipe.
  参数类型为RecipeChoice的org.bukkit.inventory中的构造器
  限定符
  构造器
  说明
  ``
  `BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  ``
  `CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  ``
  `CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  Create a cooking recipe to craft the specified ItemStack.
  ``
  `FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  Create a furnace recipe to craft the specified ItemStack.
  ``
  `SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)`
  已过时。
  as of Minecraft 1.20, smithing recipes are now separated into two distinct recipe types, `SmithingTransformRecipe` and `SmithingTrimRecipe`.
  ``
  `SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)`
  Create a smithing recipe to produce the specified result ItemStack.
  ``
  `SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)`
  Create a smithing recipe to produce the specified result ItemStack.
  ``
  `SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
  ``
  `StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input)`
  Create a cooking recipe to craft the specified ItemStack.