Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Delight Lib Wiki › Guides › Create a Custom Food Item with Nutrition Stats

Create a Custom Food Item with Nutrition Stats

Set Up Your Food Class

Food items in Delight Lib require you to define nutrition and saturation values. Create a new food class that extends the mod's food handler, then specify how much hunger and saturation your item restores when eaten.

Register Your Food

1. Define your food's identifier (namespace and name)

2. Set the hunger restoration amount

3. Set the saturation modifier

4. Assign a texture file path for your item

5. Call the registration method provided by Delight Lib

The mod handles all vanilla food mechanics automatically—no need to manually code eating animations or hunger bar updates. Your food will stack, have proper tooltips, and work with all standard Minecraft food systems.

Add a Placeable Dish Variant

If you want your food to appear as a plated dish on tables, register it as a placeable variant. This creates a block version that players can place and eat from directly, with the same nutrition values as the item.