Package net.minestom.server.recipe
Class RecipeManager
java.lang.Object
net.minestom.server.recipe.RecipeManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
@NotNull RecipeBookAddPacket
createRecipeBookResetPacket
(@NotNull Player player) Creates aRecipeBookAddPacket
which replaces the recipe book with the currently unlocked recipes for this player.@NotNull SendablePacket
@Nullable RecipeDisplay
getRecipeDisplay
(int displayId, @Nullable Player player) Get the recipe display for the specified display id, optionally testing visibility against the given player.void
removeRecipe
(@NotNull Recipe recipe)
-
Constructor Details
-
RecipeManager
public RecipeManager()
-
-
Method Details
-
addRecipe
-
addRecipe
-
removeRecipe
-
getRecipes
-
getRecipeDisplay
@Nullable public @Nullable RecipeDisplay getRecipeDisplay(int displayId, @Nullable @Nullable Player player) Get the recipe display for the specified display id, optionally testing visibility against the given player.- Parameters:
displayId
- the display idplayer
- the player to test visibility against, or null to ignore visibility- Returns:
- the recipe display, or null if not found or not visible
-
getDeclareRecipesPacket
-
createRecipeBookResetPacket
@NotNull public @NotNull RecipeBookAddPacket createRecipeBookResetPacket(@NotNull @NotNull Player player) Creates aRecipeBookAddPacket
which replaces the recipe book with the currently unlocked recipes for this player.- Parameters:
player
- the player to create the packet for- Returns:
- the recipe book add packet with replace set to true
-