FFFoodSpoilageAndPreservation

Quick rating

Community listing page, reviews here may not be monitored by the author.

FFFoodSpoilageAndPreservation

By FyxeOwner

No reviews yet

A spoilage mod with ways to preserve food. Has support for Cold Sweat, Appleskin, and EMI. Food loses hunger and saturation as it decays. Insanely configurable.

Mod Loaders
Minecraft

About

Description

FFFoodSpoilageAndPreservation

Want spoiling food AND ways to keep it fresh? Look no further! Every food slowly goes from Fresh to Rotten, and it's up to you to preserve it by smoking, drying, curing and keeping a nice cold cellar. It adds no new blocks or items, and it works with modded food too.

The detailed tooltip when holding shift

How it works

  • Food moves through five stages: Fresh, Good, Stale, Rotting and Rotten. Each stage fills you up a little less, and fully spoiled food turns into rotten flesh.
  • Where you keep food matters. An ender chest stops spoilage, and barrels, pots and bundles slow it down.
  • Cold slows spoilage and heat speeds it up. Leave food somewhere cold long enough and it freezes (let it thaw before eating!).
  • Preserve food to slow it down: Cured (craft with bone meal), Brined (craft with an awkward potion), Candied (craft with a honey bottle), Dried (cook on a campfire) and Smoked (cook in a smoker). A stronger method replaces a weaker one.
  • Food at the same stage stacks together and keeps the older food's age, so mixing in fresh food can't refresh old food.
  • Tooltips show each food's stage, time left and preservation, and preserved food gets a colored tint.
  • Some foods never spoil, like golden foods, honey, chorus fruit and rotten flesh.

Different preservation techniques.

Configuration

You can adjust:

  • How long each stage lasts and what spoiled food turns into
  • Which foods never spoil, plus spoil rates for specific foods and containers
  • How much temperature matters
  • Whether food at the same stage stacks together
  • Tooltip details and how strong the preservation tint is

Mod compatibility

  • AppleSkin: hunger and saturation previews show the spoiled values.
  • Cold Sweat: your body temperature affects the food you carry. A fueled Icebox freezes food and a fueled Boiler thaws it.
  • EMI: recipe pages for every way to preserve food.

Version differences

  • Cold Sweat support is NeoForge only, and the Icebox and Boiler work on Minecraft 1.21.1.
  • EMI support is on Minecraft 1.21.1 only, since EMI has no 1.21.11 release yet.
  • Other mods' storage: on NeoForge 1.21.1, food at the same stage also stacks inside other mods' inventories. On Fabric and on Minecraft 1.21.11, other mods' storage only stacks food with exactly the same freshness.

For datapack makers

Datapacks can add new preservation methods and categories, choose what applies or removes them, add smoker and campfire preservation recipes, and tag foods that never spoil. Click the Wiki link in the sidebar and open the Datapacks page for details.

For mod developers

Other mods can react to food spoiling and to preservation changing. Click the Wiki link in the sidebar for the API guide and examples.

What's with the FF prefix?

It stands for Fyxe's Features! It's a clean way to easily find all of my mods when changing configs or creating packs. Mods that are a part of the "FF" system are usually smaller and unintrusive.

Feedback

If you have any ideas for improvements, questions, or concerns, I am open to communicating through email: [email protected]

Overview

Want spoiling food AND gameplay mechanics to preserve it? Look no further! This mod makes any food spoil, has preservation techniques, and adds NO blocks or items. Works with modded food, is easily extensible through data packs, and supports ColdSweat, EMI, and AppleSkin!

Different preservation techniques.

Spoilable food gains a spoilage component and moves through named stages (default 1 / 2 / 3 / 2 / 2 minutes: Fresh, Good, Stale, Rotting, Rotten). Nutrition and saturation drop with each stage. When the last stage progresses, the stack is replaced with (by default) rotten flesh. Fresh food has a chance to grant buffs, near rotten food has a chance to give debuffs. Highly configurable, almost everything can be changed / enabled separately.

How to prevent or slow spoilage

  • Never spoil: server neverSpoil list accepts item ids or #tags. Defaults include golden foods, rotten flesh, chorus fruit, honey bottle, #c:foods/honey, and #c:foods/golden.
  • Rate 0: a rateOverrides entry id_or_tag=0 also stops spoilage.
  • Containers: ender chest default rate is 0. Barrels, pots, and bundles are slower than a chest or your inventory.
  • Modifiers (one per exclusive category; preservation is exclusive). A new modifier replaces one from the same category only if it slows spoilage more, so Smoked beats Candied, Candied beats Dried, Dried beats Brined, and Brined beats Cured:
    • Cured: craft with bone meal
    • Brined: craft with an awkward potion (not sweets)
    • Candied: craft with a honey bottle (not soups)
    • Dried: campfire on common meat / fish / fruit / veg / mushroom tags
    • Smoked: smoker on cooked meat / fish (stronger than Dried)
    • Frozen: ice items, or stay cold long enough (a fueled Cold Sweat Icebox freezes food in its slots)
    • Temperature: cold biomes and body temp slow spoil; heat speeds it. Frozen food cannot be eaten until it thaws (hot items, a fueled Cold Sweat Boiler, or warmth).

Tooltips (hold Shift for ALT lines): stage, modifiers, container rate, freeze/thaw progress, remaining time. Client modifierHighlight is NONE / OUTLINE / TINT / BOTH (default OUTLINE) for modifiers with tint_item.

Compat

  • AppleSkin (NeoForge and Fabric): hunger and saturation overlays use spoilage-scaled values. The mod's own effective-food tooltip line is hidden so the two do not stack. Frozen food hides the AppleSkin overlay because it cannot be eaten.
  • Cold Sweat (NeoForge only, wherever Cold Sweat itself is available): player body temperature can drive inventory food instead of biome air temp. On Minecraft 1.21.1, the Icebox and Boiler take food in their waterskin slots (by hand or by hopper). A fueled Icebox freezes that food and a fueled Boiler thaws frozen food, even when nobody has them open. Without fuel they behave like any other container. Two server settings, under temperature then coldsweat, set the speeds separately: iceboxFreezeDurationTicks (default 1200 ticks, about a minute) and boilerThawDurationTicks (default 400 ticks, about 20 seconds). Lower numbers are faster.
  • EMI (Minecraft 1.21.1, NeoForge and Fabric; EMI has no 1.21.11 release yet): recipe pages for every datapack apply and remove craft, plus smoker (Smoked) and campfire (Dried). Dynamic dummy recipes are hidden.

For datapack makers

Synced registries:

  • data/<namespace>/fffoodspoilageandpreservation/modifier_category/<id>.json
  • data/<namespace>/fffoodspoilageandpreservation/modifier/<id>.json

Category fields: priority, exclusive, display_name. Higher category priority ranks first in tooltips and draws its tint in front.

Modifier fields: category, rate_multiplier, prevent_eating, display_name, tooltip_color, item_highlight, item_tint, apply_items, remove_items, food_whitelist, food_blacklist, auto_apply_when_cold, auto_remove_when_warm.

item_highlight is none (default), tint, outline, or both, drawn in the item_tint color. Older files with tint_item: true and no item_highlight count as tint.

Within a category, the modifier with the lowest rate_multiplier (the one that slows spoilage most) ranks highest. It wins when two modifiers share an apply item, and only a higher-ranked modifier replaces an existing one in an exclusive category. Modifiers no longer have their own priority; old files that still set it load fine and the value is ignored.

apply_items may be an item, a #tag, or minecraft:potion#minecraft:awkward. A non-empty whitelist restricts foods; otherwise every spoilable food is allowed except the blacklist.

Cooking recipes (same stack, modifier applied):

  • "type": "fffoodspoilageandpreservation:modifier_smoking" (smokers)
  • "type": "fffoodspoilageandpreservation:modifier_campfire" (campfires)

Built-in ids: preservation, temperature, cured, brined, candied, dried, smoked, frozen. Old saves with "cured" resolve to fffoodspoilageandpreservation:cured.

Item tags you may overlay: #fffoodspoilageandpreservation:never_spoil, #fffoodspoilageandpreservation:soups, #fffoodspoilageandpreservation:smokable.

Modding API

See the wiki link in the sidebar -->

What's with the FF prefix?

It stands for Fyxe's Features! Its a clean way to easily find all of my mods when changing configs or creating packs. Mods that are a part of the "FF" system are usually smaller and unintrusive.

Feedback

If you have any ideas for improvements, questions, or concerns, I am open to communicating through email: [email protected]