Interface Recipe


public interface Recipe
  • Method Details

    • createRecipeDisplays

      @NotNull default @NotNull List<RecipeDisplay> 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 or SlotDisplay.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

      @NotNull default @NotNull Map<RecipeProperty,List<Material>> 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 includes Materials.STONE in RecipeProperty.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

      @Nullable default @Nullable String recipeBookGroup()
    • recipeBookCategory

      @Nullable default @Nullable RecipeBookCategory recipeBookCategory()
    • craftingRequirements

      @Nullable default @Nullable List<Ingredient> craftingRequirements()