Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Creators
Details
Changelog
Scalability Review
Analyzed the full codebase for a 50-70 player server. Confirmed it can handle the load — the main bottleneck is PlayerTracker distance cache at O(players ×
pokemon) per tick, but with 70 players and 300 Pokemon the math operations are trivial for the JVM. Provided recommended config values for large servers.
Feature: Species Blacklist
Added a configurable blacklist to prevent specific Pokemon species from being despawned.
- New config field: batch_despawn.species_blacklist = ["pikachu", "eevee"]
- New commands: /cobbleoptimizer blacklist add/remove/list
- Case-insensitive matching, auto-saves to TOML
Made Everything Configurable
Exposed all previously hardcoded values:
- batch_despawn.protect_shiny/legendary/mythical/ultra_beast — toggle protections on/off
- ai_freeze.cleanup_interval_ticks — stale entity cleanup interval
- tps_monitor.sample_window — TPS averaging window (10-1000)
Bug Fixes
- Stale lastDespawnCount — now resets to 0 when batch despawn is disabled
- Missing validation — added bounds for targetPokemonPerWorld, maxDespawnPerCycle, minDespawnRadius to prevent negative values
- Config race condition — both TickThrottleManager and AiFreezeManager now read config once at method start instead of twice
- Blacklist lookup O(n) — cached as HashSet for O(1) lookups
Performance Improvements
- PlayerTracker HashMap pre-sized to 256 (fewer rehashes)
- Replaced java.util.Random with ThreadLocalRandom (lock-free)
Feature Improvements
-
AI Freeze is now TPS-aware — only freezes AI when TPS drops below ai_freeze.tps_threshold (default 18.0). No more freezing Pokemon for no reason at 20 TPS.
-
Spawn statistics tracking — /cobbleoptimizer status now shows blocked: X/Y (how many spawns were blocked out of total).
-
Detailed despawn logging — logs now show species breakdown: Batch despawn: removed 8 [rattata x3, pidgey x2, zubat x3]
-
Emergency Mode — new [emergency] config section that coordinates all features when TPS is critically low (default <12):
- Aggressive tick skip interval (1 in 5)
- Tighter AI freeze radius (24 blocks)
- Blocks all spawns
- Forces immediate despawn sweep
- Logs activation/deactivation with TPS values
-
Entity age in despawn scoring — newer Pokemon are despawned first (players haven't seen them yet). Older entities (50+ min) get up to -50 score penalty, making them less likely to be removed.
-
Enhanced status command — shows protection flags, blacklist count, spawn stats, and emergency mode state.
Files Modified (13) + Created (1)
- CobbleOptimizerConfig.kt — 3 new data classes, new fields
- ConfigManager.kt — parse/write/keys/applyKeyValue for all new fields + blacklist methods
- ConfigValidator.kt — validation for all new fields
- CobbleOptimizer.kt — registers EmergencyManager
- FeatureManager.kt — calls TpsMonitor.onConfigReload()
- TpsMonitor.kt — configurable sample window with hot reload
- PlayerTracker.kt — pre-sized HashMap
- TickThrottleManager.kt — consistent config read + emergency integration
- AiFreezeManager.kt — TPS-aware + emergency freeze radius
- AdaptiveSpawnManager.kt — spawn stats + ThreadLocalRandom + emergency block
- BatchDespawnManager.kt — detailed logging + force sweep + stale count fix
- DespawnPriority.kt — configurable protections + blacklist Set cache + age scoring
- CobbleOptimizerCommand.kt — blacklist commands + enhanced status
- NEW: EmergencyManager.kt — emergency mode coordinator
Files
Metadata
Release channel
ReleaseVersion number
2.0.0Loaders
Game versions
1.21.1Environment
Downloads
428Publication date
February 14, 2026 at 10:10 AMPublisher
MarcoErCarrozza
Member


