Class RecipeManager
java.lang.Object
net.minestom.server.recipe.RecipeManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateRecipeBookResetPacket(Player player) Creates aRecipeBookAddPacketwhich replaces the recipe book with the currently unlocked recipes for this player.getRecipeDisplay(int displayId, @Nullable Player player) Get the recipe display for the specified display id, optionally testing visibility against the given player.voidremoveRecipe(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
Creates aRecipeBookAddPacketwhich 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
-