
OptimizeMod
Reduces server lag by throttling distant entity ticks, suspending mob AI, and limiting particles.
Screenshots


About this Mod
OptimizeMod
Keep distant simulation quiet so active gameplay gets more CPU time.
OptimizeMod is a lightweight Fabric optimization mod for Minecraft 1.21.1.
Its goal is simple: reduce work on entities and effects that players are not actively interacting with.
What OptimizeMod changes
1. Distance-based movement tick throttling (EntityTickMixin)
Hook: LivingEntity.tickMovement()
- Players are excluded.
- If no player is found within sleep distance (
96blocks by default), non-player living entities skip movement ticks (ENTITY_TICK_SKIP = 4by default). - If a player is present but farther than reduce distance (
48blocks), movement updates are throttled (roughly every other tick).
2. Distance-based AI throttling (MobEntityAIMixin)
Hook: LivingEntity.tickNewAi() (for MobEntity)
- If no player is found within reduce distance (
48blocks), AI updates are cancelled for that tick. - In mid-distance ranges, AI updates are partially throttled (every other tick).
- While throttled/cancelled,
despawnCounteris reset to avoid unwanted despawn side effects.
3. Particle throughput cap (ParticleManagerMixin, client)
Hook: ParticleManager.addParticle(...)
- Particle creation is capped with a local counter (
MAX_PARTICLES_LIMIT = 4000). - Excess particle spawn requests are dropped when the cap is exceeded.
- Intended to reduce client stutter from extreme particle bursts.
Important accuracy notes
- OptimizeMod does not guarantee fixed FPS/TPS/MSPT improvements.
- Real impact depends on mob density, player spread, chunk activity, modpack composition, JVM/runtime settings, and test scenario.
- Behavior changes for distant mobs/entities are intentional by design.
Reproducible evaluation (recommended)
To validate impact on your setup, compare baseline vs. OptimizeMod with identical conditions:
- Same Java version, JVM args, mod list, seed, and config.
- Same scenario and duration (recommended: 20-30 minutes per run).
- At least 3 baseline runs + 3 OptimizeMod runs.
- Collect comparable metrics:
- p50/p95 MSPT (
sparkor equivalent) - CPU usage (process/system)
- FPS/frame-time (client tests)
- Compare distributions (median/p95), not one-off spikes.
Installation
- Install Fabric Loader for Minecraft 1.21.1
- Install Fabric API
- Place the OptimizeMod jar in
mods/
Compatibility
- Designed to complement other optimization mods.
- As with any mixin-based mod, test your exact modpack before production deployment.
Available Versions
How to Install OptimizeMod on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).
Install Mod
Open the mod browser in the dashboard and search for "OptimizeMod". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.11, 1.21.10, 1.21.9 (+9 more)
Server-side
~ OptionalRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
OptimizeMod server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.
Is OptimizeMod compatible with fabric and forge?
OptimizeMod officially supports fabric, forge for Minecraft 1.21.11, 1.21.10, 1.21.9. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with OptimizeMod – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if OptimizeMod consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install OptimizeMod with just one click on your server.