FoodPropertiesBuilder
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Description
A builder to help create new food properties.Members
alwaysEdible() as Builder
Sets the always edible value of the food properties.
Returns: this builder for chaining.
Return Type:
FoodPropertiesBuilder
build() as FoodProperties
implicit as FoodProperties
Builds the food properties.
Return Type:
FoodProperties
effect(effect as MobEffectInstance, probability as float) as Builder
Adds an effect to the food properties.
Returns: this builder for chaining.
Parameters:
probability: float
Type: float
- The probability of the effect.
Return Type:
FoodPropertiesBuilder
fast() as Builder
Sets the fast eat value of the food properties.
Returns: this builder for chaining.
Return Type:
FoodPropertiesBuilder
nutrition(nutrition as int) as Builder
Sets the nutrition value of the food properties.
Returns: this builder for chaining.
Parameters:
nutrition: int
Type: int
- The new nutrition value.
Return Type:
FoodPropertiesBuilder
static of() as Builder
Creates a new food properties builder.
Returns: The new food properties builder.
Return Type:
FoodPropertiesBuilder
saturationModifier(saturationModifier as float) as Builder
Sets the saturation modifier of the food properties.
Returns: this builder for chaining.
Parameters:
saturationModifier: float
Type: float
- The new saturation modifier.
Return Type:
FoodPropertiesBuilder