Class CookingRecipe<T extends CookingRecipe>

    • Constructor Detail

      • CookingRecipe

        public CookingRecipe​(@NotNull
                             @NotNull NamespacedKey key,
                             @NotNull
                             @NotNull ItemStack result,
                             @NotNull
                             @NotNull Material source,
                             float experience,
                             int cookingTime)
        Create a cooking recipe to craft the specified ItemStack.
        Parameters:
        key - The unique recipe key
        result - The item you want the recipe to create.
        source - The input material.
        experience - The experience given by this recipe
        cookingTime - The cooking time (in ticks)
      • CookingRecipe

        public CookingRecipe​(@NotNull
                             @NotNull NamespacedKey key,
                             @NotNull
                             @NotNull ItemStack result,
                             @NotNull
                             @NotNull RecipeChoice input,
                             float experience,
                             int cookingTime)
        Create a cooking recipe to craft the specified ItemStack.
        Parameters:
        key - The unique recipe key
        result - The item you want the recipe to create.
        input - The input choices.
        experience - The experience given by this recipe
        cookingTime - The cooking time (in ticks)
    • Method Detail

      • setInputChoice

        @NotNull
        public T setInputChoice​(@NotNull
                                @NotNull RecipeChoice input)
        Sets the input of this cooking recipe.
        Parameters:
        input - The input choice.
        Returns:
        The changed recipe, so you can chain calls.
      • setExperience

        public void setExperience​(float experience)
        Sets the experience given by this recipe.
        Parameters:
        experience - the experience level
      • getExperience

        public float getExperience()
        Get the experience given by this recipe.
        Returns:
        experience level
      • setCookingTime

        public void setCookingTime​(int cookingTime)
        Set the cooking time for this recipe in ticks.
        Parameters:
        cookingTime - new cooking time
      • getCookingTime

        public int getCookingTime()
        Get the cooking time for this recipe in ticks.
        Returns:
        cooking time
      • getGroup

        @NotNull
        public @NotNull String getGroup()
        Get the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
        Returns:
        recipe group. An empty string denotes no group. May not be null.
      • setGroup

        public void setGroup​(@NotNull
                             @NotNull String group)
        Set the group of this recipe. Recipes with the same group may be grouped together when displayed in the client.
        Parameters:
        group - recipe group. An empty string denotes no group. May not be null.