Interface JavaFoodProperties.Builder
- All Superinterfaces:
GenericBuilder<JavaFoodProperties>
- Enclosing interface:
JavaFoodProperties
Builder for the food properties component.
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the food properties component.canAlwaysEat(boolean canAlwaysEat) Sets whether this item can always be eaten, even when the hunger bar is full.nutrition(@org.checkerframework.checker.index.qual.NonNegative int nutrition) Sets the nutrition of the item which is added to the hunger bar.saturation(@org.checkerframework.checker.index.qual.NonNegative float saturation) Sets the saturation of the item.
-
Method Details
-
nutrition
JavaFoodProperties.Builder nutrition(@org.checkerframework.checker.index.qual.NonNegative int nutrition) Sets the nutrition of the item which is added to the hunger bar.- Parameters:
nutrition- the nutrition of the item.- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
saturation
JavaFoodProperties.Builder saturation(@org.checkerframework.checker.index.qual.NonNegative float saturation) Sets the saturation of the item.- Parameters:
saturation- the saturation of the item- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
canAlwaysEat
Sets whether this item can always be eaten, even when the hunger bar is full.- Parameters:
canAlwaysEat- whether the item can always be eaten- Returns:
- this builder
- Since:
- 2.9.3
- See Also:
-
build
JavaFoodProperties build()Creates the food properties component.- Specified by:
buildin interfaceGenericBuilder<JavaFoodProperties>- Returns:
- the new component
- Since:
- 2.9.3
-