Interface FoodProperties
- All Superinterfaces:
BuildableDataComponent<FoodProperties, FoodProperties.Builder>
@NonExtendable
public interface FoodProperties
extends BuildableDataComponent<FoodProperties, FoodProperties.Builder>
Holds the food properties of an item.
- Since:
- 1.21.3
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanIftrue, this food can be eaten even if not hungry.static FoodProperties.Builderfood()@NonNegative intNumber of food points to restore when eaten.floatAmount of saturation to restore when eaten.Methods inherited from interface BuildableDataComponent
toBuilder
-
Method Details
-
food
- Since:
- 1.21.3
-
nutrition
@Contract(pure=true) @NonNegative int nutrition()Number of food points to restore when eaten.- Returns:
- the nutrition
- Since:
- 1.21.3
-
saturation
@Contract(pure=true) float saturation()Amount of saturation to restore when eaten.- Returns:
- the saturation
- Since:
- 1.21.3
-
canAlwaysEat
@Contract(pure=true) boolean canAlwaysEat()Iftrue, this food can be eaten even if not hungry.- Returns:
- can always be eaten
- Since:
- 1.21.3
-