Food Item
Represents a custom food item with customizable properties and effects.
This class allows the creation of food items that can restore hunger and saturation, apply potion effects upon consumption, and have additional features like the ability to always be eaten or conversion into another item. The created food item can be used as a CustomItem, which can be registered and given to players.
Parameters
The name of the food item.
The Material of the food item (default is COOKED_BEEF).
Constructors
Functions
Builds and returns the CustomItem representation of the food item.
Makes the food item always consumable, even when the player is not hungry.
Sets the item that the food will convert to once it is eaten.
Sets the time (in seconds) it takes to eat the food item.
Sets the saturation the food item provides.
Marks the food item as unbreakable.