Class CookingRecipeData

java.lang.Object
me.mehboss.utils.RecipeUtil.Recipe
me.mehboss.utils.data.CookingRecipeData

public class CookingRecipeData extends RecipeUtil.Recipe
Stores extra data for custom furnace-based recipes.

Extends RecipeUtil.Recipe by adding furnace-specific fields such as source item, cook time, and experience yield. This class is a simple data container and does not enforce how recipes are created.

  • Constructor Details

    • CookingRecipeData

      public CookingRecipeData(String name)
  • Method Details

    • setSource

      public void setSource(org.bukkit.inventory.ItemStack source)
      Sets the input item that this recipe smelts or cooks.
      Parameters:
      source - the furnace input item
    • getSource

      public org.bukkit.inventory.ItemStack getSource()
      Gets the input item used by this cooking recipe.
      Returns:
      the source item
    • setCookTime

      public void setCookTime(int cookTime)
      Sets the cook time in ticks. (20 ticks = 1 second)
      Parameters:
      cookTime - the number of ticks required to cook
    • getCookTime

      public int getCookTime()
      Gets how long the recipe takes to cook.
      Returns:
      cook time in ticks
    • setExperience

      public void setExperience(float experience)
      Sets the experience granted when the recipe is completed.
      Parameters:
      experience - the XP amount awarded
    • getExperience

      public float getExperience()
      Gets the experience value awarded when the item is cooked.
      Returns:
      experience amount