Class WorkstationRecipeData

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

public class WorkstationRecipeData extends RecipeUtil.Recipe
Stores additional data for workstation-based recipes such as anvils or stonecutters.

Extends RecipeUtil.Recipe by adding fields related to workstation behavior, including repair cost, experience output, and optional grouping. This class is a flexible data container and does not define how recipes must be created.

  • Constructor Details

    • WorkstationRecipeData

      public WorkstationRecipeData(String name)
  • Method Details

    • setRepairCost

      public void setRepairCost(int cost)
      Sets the repair cost for this recipe (used by anvil mechanics).
      Parameters:
      cost - the repair cost to assign
    • getRepairCost

      public int getRepairCost()
      Gets the repair cost assigned to this workstation recipe.
      Returns:
      numerical repair cost
    • hasRepairCost

      public boolean hasRepairCost()
      Checks whether this recipe has a defined repair cost.
      Returns:
      true if repairCost > 0
    • setExperience

      public void setExperience(float experience)
      Sets the amount of experience granted by this recipe.
      Parameters:
      experience - the XP reward value
    • getExperience

      public float getExperience()
      Gets the experience reward assigned to this recipe.
      Returns:
      experience value
    • getGroup

      public String getGroup()
      Gets the group tag assigned to this recipe.

      Available since Spigot 1.13+.

      Returns:
      the recipe group name, or empty string if ungrouped
    • setGroup

      public void setGroup(String group)
      Sets the group this recipe belongs to. Recipes with the same group may be visually grouped in the client.

      Available since Spigot 1.13+.

      Parameters:
      group - the group identifier, or empty string for no group