Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details

Sustenance replaces the vanilla hunger and regeneration system with a digestion-based mechanic. Instead of maintaining a hunger bar for passive healing, you digest food in a three-slot stomach queue. Digested food grants temporary max HP boosts and passive health regeneration that slowly decays as the food digests. If you have nothing in your stomach, your max health is reduced to 12 HP (6 hearts) and all passive healing stops.
Features for Players
- Three-Slot Stomach: You can digest up to 3 foods at a time. If your stomach is full, you cannot eat new foods until a slot empties. Re-eating a food already in your stomach refreshes its timer.
- Digestion Decay: Foods run at 100% efficiency during the first half of their digestion. In the second half, their health boosts and regeneration rates decay linearly to 0%.
- HUD Overlay: The standard hunger bar is replaced with slot progress indicators showing digestion timers and color-coded efficiency.
- Hunger Debuff Utility: The vanilla Hunger effect speeds up your digestion, allowing you to empty your stomach slots faster (useful to clear out toxic foods).
- The Food Journal: A craftable book that registers every food you eat. You can open it to see stats, categories, and durations for all discovered foods, or hold an item in your off-hand to analyze if it is new.

Food Categories
By default, foods are classified into three groups:
- Basic Food (Bread, Apples, Carrots): Grants +2.0 max HP (+1 heart) and slow healing (~1 HP per 10 seconds) for 3 minutes.
- Premium Meal (Cooked Meats, Golden Carrots, Stews): Grants +8.0 max HP (+4 hearts) and fast healing (~1 HP per 2.5 seconds) for 20 minutes.
- Toxic Food (Rotten Flesh, Spider Eyes, Pufferfish): Inflicts -2.0 max HP penalty and stops healing for 1 minute.

Features for Modpack Developers
Sustenance is designed to integrate cleanly into hardcore, survival, or RPG-themed modpacks. All mechanics are exposed in the world server configuration (saves/<world>/serverconfig/sustenance-server.toml):
- Custom Food Stats: Define custom health bonuses, regeneration rates, and digestion durations for specific items using the format:
"namespace:item_id|hp_bonus|regen_bonus|duration_ticks". - Category Overrides: Easily force custom modded items into Basic, Premium, or Toxic groups using list configs or item tags (
sustenance:basic_food,sustenance:premium_meal,sustenance:toxic_food). - Stomach Exemptions: Exclude items entirely (like Chorus Fruits or custom potions/bottles) so they can be eaten/drunk freely without blocking stomach slots or appearing in the Food Journal.
- Shared Discovery Pool: Option to sync food discoveries globally across all players on the server, making food research a team effort.
- Flexible Scaling: Tweak base health penalties (default -8 HP), category timers, and digestion speed multipliers.

Getting Started
Food Journal Recipe
To craft the Food Journal, arrange these items in any crafting grid:
- Top Row: Ink Sac, Feather
- Bottom Row: Book, Bowl
[ Ink Sac ] [ Feather ]
[ Book ] [ Bowl ]

Compatibility
- Built for NeoForge on Minecraft 26.2.
- Modded foods are automatically categorized (nutrition values >= 6 map to Premium, others to Basic) unless overridden in the server config.
- Custom attribute mixins handle maximum HP changes dynamically, preventing sudden health clamping and hurt-animation glitches when combining Sustenance with other health/attribute modifying mods.


