Class WorkstationRecipeData
java.lang.Object
me.mehboss.utils.RecipeUtil.Recipe
me.mehboss.utils.data.WorkstationRecipeData
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class me.mehboss.utils.RecipeUtil.Recipe
RecipeUtil.Recipe.RecipeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the experience reward assigned to this recipe.getGroup()Gets the group tag assigned to this recipe.intGets the repair cost assigned to this workstation recipe.booleanChecks whether this recipe has a defined repair cost.voidsetExperience(float experience) Sets the amount of experience granted by this recipe.voidSets the group this recipe belongs to.voidsetRepairCost(int cost) Sets the repair cost for this recipe (used by anvil mechanics).Methods inherited from class me.mehboss.utils.RecipeUtil.Recipe
addDisabledWorld, addIngredient, getAllIngredientTypes, getBookCategory, getCommand, getCooldown, getCustomItemID, getDisabledWorlds, getIgnoreData, getIgnoreModelData, getIgnoreNames, getIngredients, getIngredientSize, getKey, getName, getPerm, getResult, getRow, getSlot, getType, hasCommands, hasCooldown, hasKey, hasPerm, isActive, isCustomItem, isCustomTagged, isDiscoverable, isExactChoice, isGrantItem, isPlaceable, setActive, setBookCategory, setCommands, setCooldown, setCustomItem, setDiscoverable, setExactChoice, setGrantItem, setIgnoreData, setIgnoreModelData, setIgnoreNames, setKey, setPerm, setPlaceable, setResult, setRow, setTagged, setType
-
Constructor Details
-
WorkstationRecipeData
-
-
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
Gets the group tag assigned to this recipe.Available since Spigot 1.13+.
- Returns:
- the recipe group name, or empty string if ungrouped
-
setGroup
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
-