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