Interface FoodProperties
- All Superinterfaces:
BuildableDataComponent<FoodProperties,FoodProperties.Builder>
@NullMarked
@Experimental
@NonExtendable
public interface FoodProperties
extends BuildableDataComponent<FoodProperties,FoodProperties.Builder>
Holds the food properties of an item.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanIftrue, this food can be eaten even if not hungry.static FoodProperties.Builderfood()@org.checkerframework.checker.index.qual.NonNegative intNumber of food points to restore when eaten.floatAmount of saturation to restore when eaten.Methods inherited from interface io.papermc.paper.datacomponent.BuildableDataComponent
toBuilder
-
Method Details
-
food
-
nutrition
Number of food points to restore when eaten.- Returns:
- the nutrition
-
saturation
Amount of saturation to restore when eaten.- Returns:
- the saturation
-
canAlwaysEat
Iftrue, this food can be eaten even if not hungry.- Returns:
- can always be eaten
-