Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Links
Tags
Creators
Details
Cobalt
Cobalt is a performance mod for Fabric that fixes entity lag and speeds up mob AI without changing how the game works.
Overview
In vanilla Minecraft, crowded areas like mob farms, animal areas, and villager halls cause heavy tick lag. This happens because the game constantly checks every entity in the area against every other entity to see if they're bumping into each other or interacting.
Cobalt fixes this by indexing entities spatially. Instead of checking everything in the surrounding chunks, the game instantly looks up only the entities that are right next to each other. This eliminates lag spikes around dense farms without changing vanilla mob behavior, cramming, or physics.
Benchmarks
Tested with the Spark Profiler:
| Metric | Vanilla | Cobalt | Improvement |
|---|---|---|---|
| Max Lag Spike | 118.4 ms | 32.5 ms | 3.6× lower peak spike (−72.6%) |
| 95th Percentile (Worst 5% of ticks) | 15.1 ms | 8.1 ms | −46.3% |
| Average Tick Time (Mean MSPT) | 7.93 ms | 6.30 ms | −20.6% |
| Median Tick Time (MSPT) | 6.36 ms | 6.38 ms | Baseline parity |
| Process CPU Usage | 16.22% | 11.89% | −26.7% |
(Lower is better. Minecraft's tick budget is 50.0 ms for 20 TPS)
Test Conditions:
- Version: Minecraft 1.21.1 (Fabric)
- Scenario: A crowded farming area with EXACTLY 401 active entities: 100 Cows, 100 Sheep, 100 Pigs, and 100 Chickens in high-density areas.
- Testing: A 30-second continuous run (600 ticks) measured using Spark.
Key Improvements
- Smoother Mob Collisions: Drastically reduces lag in crowded mob farms, animal farms, and busy multiplayer areas.
- Faster Item & XP Merging: Merges dropped items and experience orbs much faster without causing micro-stutters or memory spikes.
- Lighter Mob AI: Speeds up how mobs look for nearby players.
Compatibility
- Client & Server: Works in single-player and on multiplayer servers. Players do not need the mod installed to join a server running Cobalt.
- Mod Compatibility: Works seamlessly alongside Sodium, Lithium, FerriteCore, and other performance mods.
- Platform: Fabric Loader


