01How settlement works
First the item has a configured base duration. Environment changes item temperature; temperature curves, dimension multipliers and cold-fresh protection affect spoilage speed. The server settles remaining time. Temperature curves change decay, while the Effects section changes what happens when the food is eaten.
02Eight editor sections
Hold an item and use /hdui in game to reach the shelf-life editor. Tabs below mirror its eight sections and are read-only explanations, not a way to save configuration.
Shelf life
Set base duration and base decay multiplier. The editor accepts minutes, hours, real days (1,440 minutes) or game days (20 minutes); the saved durationMinutes is an integer. A dimension without a configured multiplier uses ×1.
| Field | Meaning |
|---|---|
| Duration / base multiplier | Starting shelf life and base rate; multiplier 0 means no base decay. |
| Expiration result / inherit temperature | minecraft:air means disappearance. An expiration product can inherit temperature at that instant, but its own shelf life starts over. |
| Expiration command | Runs in the holder’s context only when held food expires; not for container contents or dropped items. |
| Dimension multipliers | Per-dimension spoilage rates, not temperature offsets. |
Basics
These fields set absolute item temperature bounds, initial temperature when shelf-life tracking starts and the edible temperature range; they do not directly alter decay rates. Changing the initial temperature does not immediately reset existing items.
Temperature curves
Each curve interpolates linearly between a start and end temperature and their decay multipliers. Optional outer buffers ease it back toward ×1 outside the main interval; without a buffer, one curve contributes ×1 outside its interval. At most 16 curves; start must be lower than end. Multipliers above 1 accelerate spoilage, below 1 slow it, and simultaneous curves multiply. Buffer values are absolute temperatures, not extra minutes. These curves do not apply eating potion effects.
Effects
Up to 20 custom zones: effect ID, temperature interval, inclusive/exclusive endpoints, start/end levels and tick durations, and particles. On consumption inside the interval, levels and duration interpolate between endpoints. New zones require start < end; level I corresponds to stored 0; the editor accepts seconds in increments of 0.05 (one tick). Empty configuration yields no zones. Legacy four-slot fields are migration input, not four automatically generated effects.
Natural environment
Set a base temperature change and time interval (for example 1°C per two minutes), not a change in remaining shelf life. As the item and ambient temperature diverge, separate cooling/warming step increments, temperature thresholds and multiplier caps can accelerate temperature change. Frozen, low, normal and hot zones have independent extra speed adjustments; these are not potion levels or a way to directly set an existing item’s temperature.
Refrigerator
Fridge and freezer each have temperature-change amounts and intervals. Four zone-specific speed bonuses apply in fridge environments and do not replace natural-environment settings. Being in a freezer does not guarantee an item has reached its own fully-frozen threshold; recovery depends on the item’s actual temperature.
Cold-fresh protection
Set fully-frozen, freezing, cold-fresh and hot boundaries and a preservation rate at 50% cold-fresh progress. Progress begins below the cold-fresh start, reaches 50% at the freezing point and 100% when fully frozen. Neighboring cold thresholds differ by at least 1°C; the fully-frozen point is within item bounds. The 50% preservation fraction is 0–1; fully frozen can reach 100% protection. Protection changes spoilage rate, while natural/fridge settings control how temperature moves.
Cold retention
When coldRetention is enabled, fully-frozen food pauses consumption and recovers previously spent time at coldRecoveryRate minutes per frozen minute. A zero recovery rate pauses consumption only. Outside fully frozen, time drains normally. After cumulative loss reaches coldDegradationRate steps (percent of base duration), the maximum recoverable time drops permanently by a step. Refreezing does not restore that ceiling. Not every food enables this rule.
03Time away from the inventory and multiplayer protection
Food uses different clocks on a player, in a container and on the ground; the server settles it, while the client only advances a display at the rate the server sends.
Two clocks and server authority
Food in the player inventory, armor slots, off hand or cursor uses the player’s online playtime; it does not advance while the player is offline. Chests, refrigerators, other containers, dropped items and placed block foods use world time, which continues while the server is running. Food in the creative inventory or JEI does not tick.
Spoilage, temperature and cold-fresh progress are calculated by the server; the client sees a snapshot. The displayed number advances each second at the rate the server sends, so it looks live, but the server value is authoritative. Editing the client cannot create fresh food. Tooltip text and colors also follow the server’s scheme files.
Changing hands, logging in and changing dimension
When food changes hands, its clock is re-based from the moment the new owner receives it; a long-online previous owner does not make it spoil immediately. Logging in or changing dimension also re-bases the clock, and offline time is not added to carried food.
The inventory and dropped items refresh about every 20 seconds; press S to settle immediately and see current values. Opening a container, starting to eat or accessing a Tom storage terminal also refreshes the inventory without waiting for the next cycle.
Who owns an item
When shelf-tracked food is placed into a container, it receives the inserter’s owner mark. Other players see a red frame and cannot take it; protected food on the ground cannot be picked up either. Refrigerators and Tom storage terminals follow the same rule.
Only “placed into a container” creates ownership: if you take half of a wild chest’s contents, the remainder does not become yours merely because you touched it, and other players may still take it fairly. Conversely, food that has never been in a container has no owner; freshly crafted or picked-up food carried on your person can be given away freely. Once marked, ownership follows the item, so taking it back from your own chest into your inventory keeps it yours.
Hold S for details; if the owner is not you, an “Item owner” line appears at the bottom. The same food type with different owners cannot stack together and splits into two stacks, so marks are not overwritten.
Trust list and ownership transfer
Use /hdtrust to manage the trust list for your protected items; no OP is required:
| Command | Effect |
|---|---|
/hdtrust add <player> | Adds an online player to the current trust list; they may take your protected food normally. |
/hdtrust remove <player> | Removes current trust but keeps the “formerly trusted” history; items already taken and not returned are transferred to that player. |
/hdtrust forget <player> | Clears both current trust and history, treating the player as never trusted. |
/hdtrust list | Shows current and formerly trusted lists; clicking a name can remove or re-trust. |
Trust always refers to the original owner: if a friend takes your food and puts it in their own chest, you remain the owner. If you throw food out, that counts as giving it away and the mark is cleared; if a friend takes your food and then throws it out, the same applies.
Death drops are not a gift: food that had no owner receives your mark at the moment you die, while already-owned food keeps its original owner. Strangers cannot pick it up; you and your trusted players can, and you can recover it after respawning. If the server enables removeOwnerOnDeathDrop (suited to PvP servers), death drops have their protection cleared and anyone may pick them up.
ejectIllegalProtectedItems to drop such items at the holder’s feet; it is off by default to avoid harming whole batches if a trust file is damaged.While every authorized player is offline, container food does not spoil
When the protected item’s owner and all currently trusted players are offline, time inside chests, refrigerators and other containers is not counted as spoilage; if any authorized person remains online, settlement continues normally.
The server records “all authorized players offline” intervals in an offline ledger. Containers are settled only when opened, so the deduction is applied when someone returns to look. The ledger records only intervals after it is enabled; earlier offline time cannot be recovered. Protected food dropped on the ground does not receive this protection and still spoils.
Containers, loot and dropped items
Closed chests are not scanned continuously. Each food records its last settlement time; opening the chest settles the whole interval at once using the previous temperature. Weather changes in the middle are not re-simulated segment by segment, so the result can differ slightly from continuous simulation, but it is close and costs almost no performance.
Opening a chest, clicking an item in it or pressing S settles immediately. Food in a chest that has not started ticking—for example, inserted by a command or another mod, or placed before shelf life was configured in an old save—receives a mark and starts its clock when the chest is opened or S is pressed. When a chest is broken, its contents are settled and their refrigerator state is cleared before they drop, so an item cannot “think it is still in a fridge” after landing. Hoppers and pipes inserting into chests follow the same merge rules, and merged stacks use the worse portion.
Food generated in loot chests or dropped by mobs receives a shelf-life mark at the moment it is created, as fresh food starting from zero; this also applies when mods such as Touhou Little Maid or Create place harvests directly into their inventory. Food you craft, cook or machine-process does not receive this treatment and starts timing only when a player or container first sees it.
Dropped items align to 20-second time slots; the same food type dropped in the same slot has identical shelf data, so it can still stack on the ground. The first short interval after landing is not counted, keeping the error in the player’s favor. Unloaded chunks are not simulated; when the chunk loads again, the intervening time is settled at once.
Placed block foods such as cake use world time: a chunk load settles once, and the same chunk is settled at most once every 3 minutes; force-loaded chunks such as FTB Chunks settle once per minute. Spoiled cake disappears or drops its expiration product; placing an already-spoiled cake immediately turns it into that product. A completely untouched cake can be broken and recovered with its original shelf life; a partially eaten cake cannot.
With Jade installed, pointing at dropped food adds a shelf-life line to the HUD, accurate to the second with one decimal place for percentages; the data still comes from the server. Food in chests and in hand continues to use item tooltips.
Stacking thresholds
| Condition | Default threshold |
|---|---|
| Remaining shelf-life difference | At most 5 minutes |
| Item temperature difference | At most 10°C |
| Cold-fresh progress difference | At most 20 (0–100 scale) |
All three conditions must be met to merge, and the merged stack uses the worse portion, so fresh food cannot “wash” a nearly spoiled stack. The thresholds can be adjusted in the shelfMerge section of config/healthy_diet/server.json. Dropped items require identical shelf data to stack; two stacks with different cold-retention ceilings also cannot merge.
Expiration commands and products
The expiration command runs only when food spoils while held by a player, or when a bite is taken from an already-spoiled cake; it does not run when food spoils inside a container or on the ground. The expiration product is a new item without the original NBT, keeping the count; if it does not fit, it returns to the inventory, and if the inventory is full it drops on the ground.