Ice and Fire Memory Fix

Quick rating

Ice and Fire Memory Fix

No reviews yet

Reduces Ice and Fire memory leaks and entity tick overhead with weak-reference caches and allocation-free state queries.

Bug Fixes
Performance & Optimization
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

About

Project Details

Type
Mod
Latest Version
iaf_memory_fix-1.0.0.jar
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID

Resources

External Links

Source Issues Wiki Discord

About

Description

📖 Mod Description

Ice and Fire attaches a "status data packet" to every single living entity in the game (including animals, monsters, and villagers) to track effects like frozen, chain, siren charm, and more. The problem is — the vast majority of these entities never use these features, yet they still carry around the full data packet, and the game has to look it up every single tick.

The result: high memory overhead and unnecessary performance cost.

This mod does exactly this: eliminates unnecessary memory usage and shortens the query path.

TL;DR: ~20% less memory, ~7% more performance.


⚙️ How It Works

1. Cache Query Results — No More Detours

The first time an entity needs its status data, it queries normally. After that, the result is stored directly on the entity itself. Next time, it's a direct hit — no more wandering through global registries.

2. Create Only When Needed — No Upfront Allocation

Originally, every entity immediately allocates 4 objects (chain, charm, rotten egg, misc) regardless of whether they'll ever use them. After optimization, objects are only created when actually needed. Ordinary animals/monsters/villagers will never allocate these unnecessary objects.

3. Reads Stay Reads, Writes Stay Writes

Read-only paths use a shared empty object and never generate new data. Only paths that actually modify state will create dedicated data.

4. Release on Empty State, Save Only What Matters

When states return to empty, their corresponding objects are released immediately. NBT only saves meaningful data. Fully compatible with old saves — upgrade with peace of mind.


📊 Optimization Results

Test method: Spark heapsummary, same mod pack, same seed, exploring for 5 minutes.

Metric Unoptimized Optimized Improvement
Ice and Fire related memory 382 KB 272 KB -28.7%
Status data packet internal memory 169 KB 72 KB -57.0%
Status data cost per entity ~220 B ~96 B -56.1%
Total 4 lazy sub-objects 3,080 17 -99.45%
JVM used heap 4.13 GiB 3.57 GiB ~ -478 MiB

🕹️ 6-Hour Gameplay Comparison

Same mod pack, render distance, and entity distance. TPS stable at 20. Alternating between exploration and base activities.

Metric Unoptimized Optimized Difference
Per-tick queries Hundreds of millions of global lookups Direct local cache reads Most queries eliminated
JVM used heap ~6.2 GiB ~4.9 GiB ~ -1.3 GiB

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~2,000
Downloads
Last Updated
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works