Package org.bukkit.inventory
Class SmithingTrimRecipe
java.lang.Object
org.bukkit.inventory.SmithingRecipe
org.bukkit.inventory.SmithingTrimRecipe
- All Implemented Interfaces:
Keyed
,ComplexRecipe
,Recipe
,Keyed
Represents a smithing trim recipe.
-
Constructor Summary
ConstructorsConstructorDescriptionSmithingTrimRecipe
(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) Deprecated, for removal: This API element is subject to removal in a future version.SmithingTrimRecipe
(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) Deprecated, for removal: This API element is subject to removal in a future version.SmithingTrimRecipe
(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, @NotNull TrimPattern pattern) Create a smithing recipe to produce the specified result ItemStack.SmithingTrimRecipe
(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, @NotNull TrimPattern pattern, boolean copyDataComponents) Create a smithing recipe to produce the specified result ItemStack. -
Method Summary
Modifier and TypeMethodDescriptionGet the template recipe item.Get the trim pattern.Methods inherited from class org.bukkit.inventory.SmithingRecipe
getAddition, getBase, getKey, getResult, willCopyDataComponents, willCopyNbt
-
Constructor Details
-
SmithingTrimRecipe
public SmithingTrimRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull RecipeChoice template, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition, @NotNull @NotNull TrimPattern pattern) Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keytemplate
- The template item (RecipeChoice.empty()
can be used)base
- The base ingredient (RecipeChoice.empty()
can be used)addition
- The addition ingredient (RecipeChoice.empty()
can be used)pattern
- The trim pattern
-
SmithingTrimRecipe
public SmithingTrimRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull RecipeChoice template, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition, @NotNull @NotNull TrimPattern pattern, boolean copyDataComponents) Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keytemplate
- The template item. (RecipeChoice.empty()
can be used)base
- The base ingredient (RecipeChoice.empty()
can be used)addition
- The addition ingredient (RecipeChoice.empty()
can be used)pattern
- The trim patterncopyDataComponents
- whether to copy the data components from the input base item to the output
-
SmithingTrimRecipe
@Deprecated(since="1.21.5", forRemoval=true) public SmithingTrimRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull RecipeChoice template, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition) Deprecated, for removal: This API element is subject to removal in a future version.Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keytemplate
- The template item (RecipeChoice.empty()
can be used)base
- The base ingredient (RecipeChoice.empty()
can be used)addition
- The addition ingredient (RecipeChoice.empty()
can be used)
-
SmithingTrimRecipe
@Deprecated(since="1.21.5", forRemoval=true) public SmithingTrimRecipe(@NotNull @NotNull NamespacedKey key, @NotNull @NotNull RecipeChoice template, @NotNull @NotNull RecipeChoice base, @NotNull @NotNull RecipeChoice addition, boolean copyDataComponents) Deprecated, for removal: This API element is subject to removal in a future version.Create a smithing recipe to produce the specified result ItemStack.- Parameters:
key
- The unique recipe keytemplate
- The template item. (RecipeChoice.empty()
can be used)base
- The base ingredient (RecipeChoice.empty()
can be used)addition
- The addition ingredient (RecipeChoice.empty()
can be used)copyDataComponents
- whether to copy the data components from the input base item to the output
-
-
Method Details
-
getTemplate
Get the template recipe item.- Returns:
- template choice
-
getTrimPattern
Get the trim pattern.- Returns:
- trim pattern
-
SmithingTrimRecipe(NamespacedKey, RecipeChoice, RecipeChoice, RecipeChoice, TrimPattern)
instead