Interface FoodProperties.Builder

All Superinterfaces:
DataComponentBuilder<FoodProperties>
Enclosing interface:
FoodProperties

@Experimental @NonExtendable public static interface FoodProperties.Builder extends DataComponentBuilder<FoodProperties>
Builder for FoodProperties.
  • Method Details

    • canAlwaysEat

      @Contract(value="_ -> this", mutates="this") FoodProperties.Builder canAlwaysEat(boolean canAlwaysEat)
      Set if this food can always be eaten, even if the player is not hungry.
      Parameters:
      canAlwaysEat - true to allow always eating
      Returns:
      the builder for chaining
      See Also:
    • saturation

      @Contract(value="_ -> this", mutates="this") FoodProperties.Builder saturation(float saturation)
      Sets the saturation of the food.
      Parameters:
      saturation - the saturation
      Returns:
      the builder for chaining
      See Also:
    • nutrition

      @Contract(value="_ -> this", mutates="this") FoodProperties.Builder nutrition(@org.checkerframework.checker.index.qual.NonNegative int nutrition)
      Sets the nutrition of the food.
      Parameters:
      nutrition - the nutrition, must be non-negative
      Returns:
      the builder for chaining
      See Also: