Package org.bukkit.inventory
Class SmithingRecipe
java.lang.Object
org.bukkit.inventory.SmithingRecipe
- Direct Known Subclasses:
SmithingTransformRecipe
,SmithingTrimRecipe
Represents a smithing recipe.
-
Constructor Summary
ConstructorDescriptionSmithingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) Create a smithing recipe to produce the specified result ItemStack.SmithingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyNbt) Create a smithing recipe to produce the specified result ItemStack. -
Method Summary
-
Constructor Details
-
SmithingRecipe
public SmithingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition) Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keyresult
- The item you want the recipe to create.base
- The base ingredientaddition
- The addition ingredient
-
SmithingRecipe
public SmithingRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull ItemStack result, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition, boolean copyNbt) Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keyresult
- The item you want the recipe to create.base
- The base ingredientaddition
- The addition ingredientcopyNbt
- whether to copy the nbt from the input base item to the output
-
-
Method Details
-
getBase
Get the base recipe item.- Returns:
- base choice
-
getAddition
Get the addition recipe item.- Returns:
- addition choice
-
getResult
Description copied from interface:Recipe
Get the result of this recipe. -
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object. -
willCopyNbt
public boolean willCopyNbt()Whether or not to copy the NBT of the input base item to the output.- Returns:
- true to copy the NBT (default for vanilla smithing recipes)
-