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 pens, 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.
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 and targets.
Benchmarks
Tested with the Spark Profiler:
| Metric | Vanilla | Cobalt | Improvement |
|---|---|---|---|
| Max Spike (1m active test) | 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% lower tick variance |
| Average Tick Time (Mean MSPT) | 7.93 ms | 6.30 ms | 20.6% faster overall |
| Process CPU Usage | 16.22% | 11.89% | 26.7% less CPU load |
(Lower is better. Minecraft's tick budget is 50.0 ms for 20 TPS)
Test Conditions:
- Version: Minecraft 1.21.1 (Fabric)
- Scenario: 401 active entities (100 Cows, 100 Sheep, 100 Pigs, 100 Chickens in high-density areas).
- Testing: 30-second continuous run (600 ticks) measured using Spark.
Compatibility
Cobalt is designed to drop into any optimization stack. It is fully compatible with Lithium, FerriteCore, ModernFix, and other standard performance mods.
Modpacks & Permissions
- You are free to include Cobalt in any public or private modpack.
- Standalone redistribution or re-uploading of binaries is not permitted.
Issues & Feedback
Found a bug or have a suggestion? Report it on the GitHub Issue Tracker.