Recoleta: A Memory Optimization Add-on for Minecraft
If your modded world has grown sluggish and your RAM graph looks like a mountain range, Recoleta is worth a closer look. This add-on ports the spirit of two JDK 25 JEPs into the running game without requiring a JDK 25 runtime, bringing compact object headers and generational memory reuse concepts directly into the Minecraft game loop. The result is a leaner footprint per object, fewer transient allocations, and smoother behavior under heap pressure.
What Recoleta Actually Does
At its core, Recoleta attacks memory waste from several angles at once. The headline feature is compact object headers: every object header shrinks from 12 bytes to 8 bytes, and dominant Minecraft value data gets encoded into compact primitive forms. In practice, typical per-instance footprints drop from 24 to 56 bytes down to just 8 bytes. That adds up fast across thousands of entities, block entities, and item stacks.
The second pillar mimics Generational Shenandoah by adding young and old generations to a low-pause concurrent approach. It uses generational reuse pools, bounded per-tick reference draining, and heap-pressure callbacks to recreate low-pause locality inside the game loop. For players, that translates to fewer stutter spikes during heavy chunk activity.
Additional Reduction Paths
Beyond the big two, Recoleta layers in a series of smaller optimizations:
- Bounded LRU caches with soft-reference values for cache-like workloads
- Weak interning for repetitive strings to cut duplicate heap copies
- Thread-local reusable position and vector carriers for hot loops
- Idle-time slack trimming for long-lived expandable buffers
- Heap-pressure notifications wired to proactive eviction and reclaim callbacks
- A per-render-style particle cap below vanilla's 16384 to reduce client memory spikes
Path collision caching now uses compact packed keys, path stepping reuses mutable vector slots, and spawn-distance checks rely on scalar math to avoid temporary geometry objects. Hot spawn-position loops reuse mutable coordinate carriers, small-NBT paths right-size their backing maps, and freshly decoded compounds get repacked so loaded tags carry no slack. Empty list-tag containers start with a small backing array sized for typical payloads like enchantments, lore, and modifier lists. Capability comparison short-circuits per entry, avoiding two full tag snapshots on every item-stack equality check, and chunk streaming packets start their block-entity list at a small capacity instead of the default ten slots.
Supported Versions and Loader
Recoleta is built as a Forge add-on, with its configuration living in config/recoleta-memory.toml. Because it hooks into core memory behavior, it targets modern Minecraft releases where Forge is actively maintained. Before you download Recoleta, check the project page for the exact game versions listed, since memory-level tweaks are tightly coupled to internal class layouts. If you run a multi-version modpack, keep separate profiles per version rather than mixing jars.
For players who prefer a hands-off setup, the foxygame.net launcher bundles Recoleta into its add-on catalog, so version matching and dependency checks happen automatically before anything touches your game folder.
How to Install Recoleta
Installation follows the standard Forge add-on routine. First, confirm you are running a Forge profile that matches a supported Minecraft version. Next, place the Recoleta jar into your mods folder alongside your other add-ons. Launch the game once so the config file generates, then open config/recoleta-memory.toml to review the toggles. Every switch is re-read on each access, so you can edit values at runtime without restarting. To verify a tuning is actually active, run the /recoleta memory status command and check the hit counts each reduction reports.
Compatibility Notes
The author is upfront about limits: some changes are destructive, and broad mod compatibility is not guaranteed. For the current release, issues related to Sable, Sinytra Connector, Lithium and its derivatives will not be accepted. Compatibility with ModernFix and FerriteCore should be maintained, which makes Recoleta a reasonable companion for common performance stacks.
Final Thoughts
Recoleta is not a magic FPS button, but it is a genuinely technical memory add-on for players who understand that lag often starts with allocation churn. If you run large modpacks, sprawling storage systems, or heavy entity farms, the combination of compact headers, pooling, and pressure-aware cleanup can meaningfully reduce your heap footprint. Test it on a backup world first, watch the status command, and tune from there. For anyone chasing stable tick times in Forge-based Minecraft, Recoleta deserves a spot in the mods folder.