Class CraftingRecipeData
java.lang.Object
me.mehboss.utils.RecipeUtil.Recipe
me.mehboss.utils.data.CraftingRecipeData
Stores additional data for custom crafting recipes.
Extends RecipeUtil.Recipe with fields used only by crafting systems,
including leftover item rules, conditional requirements, and
optional recipe grouping. This class acts only as a data container
and does not enforce how a recipe is 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 TypeMethodDescriptionvoidSetter for adding an ingredient as a leftoverGets the ConditionSet attached to this recipe.getGroup()Getter for the recipe group.isLeftover(String id) Checks if a MATERIAL is marked as leftover.voidSets the ConditionSet for this recipe.voidSets the group of the recipe.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
-
CraftingRecipeData
-
-
Method Details
-
addLeftoverItem
Setter for adding an ingredient as a leftover- Parameters:
id- the id of the ingredient to be leftover.
-
isLeftover
-
getGroup
Getter for the recipe group.Available since Spigot 1.13+
- Returns:
- the group string this recipe belongs to. Empty string means no group.
-
setGroup
Sets the group of the recipe. Recipes with the same group may be grouped together when displayed in the client.Available since Spigot 1.13+
- Parameters:
group- the group name. Empty string denotes no group.
-
getConditionSet
Gets the ConditionSet attached to this recipe. Conditions define extra requirements for crafting (e.g. world, time, weather).- Returns:
- the ConditionSet for this recipe, never null
-
setConditionSet
Sets the ConditionSet for this recipe. Ifcsis null, an empty ConditionSet is applied instead.- Parameters:
cs- the new ConditionSet for this recipe, can be null
-