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.
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
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.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
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
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
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources
