Interface VillagerFood


@NullMarked @NonExtendable public interface VillagerFood
Represents items that villagers can eat. Villagers will pick up items with this component in addition to items in the Tag.ITEMS_VILLAGER_PICKS_UP tag.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @Positive int
    Gets the nutrition value of this item.
    villagerFood(@Positive int nutrition)
     
  • Method Details

    • villagerFood

      @Contract(value="_ -> new", pure=true) static VillagerFood villagerFood(@Positive int nutrition)
    • nutrition

      @Contract(pure=true) @Positive int nutrition()
      Gets the nutrition value of this item.
      Returns:
      the nutrition value