
Cobblemon:Crzbrain
CRZbrain is a Kotlin-based Fabric mod for Minecraft/Cobblemon that gives Pokemon an AI-powered brain featuring reinforcement learning, sentiment analysis, cross-trainer knowledge sharing, and adaptive response generation to make Pokemon interaction
Tags
Creators
Details
2.1.0
Compatibility
Changes
● v2.7 TPS Optimization - Summary
Fix 1: PokemonDefenseSystem (HIGH impact)
- Tick interval increased from 5 (0.25s) to 20 ticks (1s) → 75% fewer calls
- Entity search now runs once per player instead of once per Pokemon per player (was NM, now 1N). If 10 players have 6 Pokemon each, that's 60 AABB searches → 10
- Auto-deactivate: defense mode automatically disables when no threats remain, preventing useless detectThreats() calls every tick
Fix 2: Async File I/O (HIGH impact)
- MemorySystem.batchSave(), ReinforcementLearning.saveData(), AdvancedPatternMining.saveData(), and CollectiveIntelligence.saveData() now all run on CompletableFuture.runAsync instead of the main server thread
- AtomicBoolean lock prevents concurrent saves from overlapping
- Main thread no longer freezes during JSON serialization (was several MB every 60s)
Fix 3: Memory Leak Prevention (22 systems, MEDIUM impact)
- Added reset(pokemonId) functions to 19 AI systems that had none (EmotionalMomentum, ConversationMemory, NarrativeEngine, DeepThinking, DeepPersonality, UltraConsciousness, ProactiveAI, VoicePatterns, LexicalVariety, AdvancedPersonalitySystem, MasterMind, EmotionalIntelligence, PokemonSocialAI, SmartResponseGenerator, PokemonGoals, DynamicPersonality, PokemonLifeStory, PokemonBondSystem, LearningContextIntegration)
- Wired 4 existing resets that were never connected (PersonalityEvolution, MoodSystem, SmartConversation, WisdomSystem)
- PokemonLifecycleManager now cleans up all 39 systems on stale Pokemon eviction (was only 17)
Fix 4: Chat Learning Throttle (MEDIUM impact)
- 2-second cooldown between learning triggers from the same player
- Max 3 Pokemon learn per chat message (was unlimited - every Pokemon of every nearby player)
- Drastically reduces CPU load on servers with active chat
Estimated TPS improvement ┌─────────┬─────────────────┬──────────────┐ │ Players │ Before │ After │ ├─────────┼─────────────────┼──────────────┤ │ 1-2 │ ~0.5-1 TPS lost │ ~0.1-0.2 TPS │ ├─────────┼─────────────────┼──────────────┤ │ 5-10 │ ~1-3 TPS lost │ ~0.3-0.7 TPS │ ├─────────┼─────────────────┼──────────────┤ │ 20+ │ ~3-5+ TPS lost │ ~0.5-1.5 TPS │ └─────────┴─────────────────┴──────────────┘
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:JbNzzoj3:D6uKqls0"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JbNzzoj3:D6uKqls0"
}
