Class Recipe
java.lang.Object
ke.ric.cooking.data.Recipe
- Direct Known Subclasses:
RecipeRegistration.AddonRecipe
Represents a complete recipe with ingredients, actions, and rules.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMatch(List<CraftingInput> inputs) Check if a list of inputs can potentially match this recipe.Get a human-readable description of the availability period.Get immutable quantified byproducts.getId()intGet the number of optional ingredient slots.intintintintGet the number of required ingredient slots.getRules()booleanbooleanCheck if this recipe is currently available based on the real-world date.booleanCheck if this recipe has seasonal availability restrictions.voidsetActions(List<RecipeAction> actions) voidsetAvailableFrom(String dateStr) Set availability start date from string format "MM-DD".voidsetAvailableFrom(MonthDay availableFrom) voidsetAvailableUntil(String dateStr) Set availability end date from string format "MM-DD".voidsetAvailableUntil(MonthDay availableUntil) voidsetByproducts(List<RecipeByproduct> byproducts) voidsetDescription(String description) voidvoidsetIngredients(List<IngredientSlot> ingredients) voidvoidsetOutputAmount(int outputAmount) voidsetOutputRef(RecipeItemRef outputRef) voidsetOutputVariants(List<Recipe.OutputVariant> variants) voidsetOverrideStrength(int overrideStrength) voidsetPackMetadata(ContentPackMetadata packMetadata) voidsetPressAnimation(PressAnimationProfile pressAnimation) voidsetProcessingTime(int processingTime) voidsetRules(List<RecipeRule> rules) voidsetSourceId(String sourceId) voidsetStation(String stationName) voidsetStation(CookingStation station) voidsetStationName(String stationName) voidsetWeightedOutputs(List<WeightedOutput> weightedOutputs) toString()
-
Constructor Details
-
Recipe
public Recipe()
-
-
Method Details
-
getStationName
-
setStationName
-
getDescription
-
setDescription
-
getOutputVariants
-
setOutputVariants
-
getId
-
setId
-
getStation
-
setStation
-
setStation
-
getOutput
-
setOutput
-
getOutputRef
-
setOutputRef
-
getOutputAmount
public int getOutputAmount() -
setOutputAmount
public void setOutputAmount(int outputAmount) -
getProcessingTime
public int getProcessingTime() -
setProcessingTime
public void setProcessingTime(int processingTime) -
getIngredients
-
setIngredients
-
getActions
-
setActions
-
getRules
-
setRules
-
getWeightedOutputs
-
setWeightedOutputs
-
hasWeightedOutputs
public boolean hasWeightedOutputs() -
getByproducts
Get immutable quantified byproducts. These are separate from returned containers and are delivered in addition to the primary recipe output. -
setByproducts
-
getOverrideStrength
public int getOverrideStrength() -
setOverrideStrength
public void setOverrideStrength(int overrideStrength) -
getSourceId
-
setSourceId
-
getPackMetadata
-
setPackMetadata
-
getPressAnimation
-
setPressAnimation
-
getAvailableFrom
-
setAvailableFrom
-
setAvailableFrom
Set availability start date from string format "MM-DD". -
getAvailableUntil
-
setAvailableUntil
-
setAvailableUntil
Set availability end date from string format "MM-DD". -
isSeasonal
public boolean isSeasonal()Check if this recipe has seasonal availability restrictions. -
isAvailable
public boolean isAvailable()Check if this recipe is currently available based on the real-world date. Returns true if no availability restrictions are set. -
getAvailabilityDescription
Get a human-readable description of the availability period. -
getRequiredSlotCount
public int getRequiredSlotCount()Get the number of required ingredient slots. -
getOptionalSlotCount
public int getOptionalSlotCount()Get the number of optional ingredient slots. -
canMatch
Check if a list of inputs can potentially match this recipe. This checks if all required slots can be filled and max limits are respected. -
toString
-