Package net.minestom.server.recipe
Interface Recipe
public interface Recipe
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable List
<Ingredient> default @NotNull List
<RecipeDisplay> Creates recipe displays for use in the recipe book.default @NotNull Map
<RecipeProperty, List<Material>> Returns the item properties associated with this recipe.default @Nullable RecipeBookCategory
default @Nullable String
-
Method Details
-
createRecipeDisplays
Creates recipe displays for use in the recipe book.Displays should be consistent across calls and not specific to a player, they may be cached in
RecipeManager
.Note that stonecutter recipes are always sent to the client and not present in the recipe book. Stonecutter ingredients must be
SlotDisplay.Item
orSlotDisplay.Tag
to be shown on the client.- Returns:
- a list of recipe displays, or none if the recipe should not be displayed in the recipe book
-
itemProperties
Returns the item properties associated with this recipe. These are sent to the client to indicate client side special slot prediction. For example, if a recipe includesMaterials.STONE
inRecipeProperty.FURNACE_INPUT
, the client will predict that item being placed into a furnace input (note that final placement is still decided by the server).Item properties should be consistent across calls and not specific to a player, they may be cached in
RecipeManager
.- Returns:
- A map of item properties associated with this recipe.
-
recipeBookGroup
-
recipeBookCategory
-
craftingRequirements
-