
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
Bug Fix: Confused conversations when multiple Pokemon are out
Problem: When multiple Pokemon were out of their Pokeballs at the same time, they would say things that didn't make sense - wrong personality, wrong stats,
mixed-up context.
Root causes found and fixed:
Fix 1 — ResponseContext was shared (AIHandler.kt)
- Before: A single ResponseContext was built using only the first Pokemon's data (level, health, friendship, mood). All Pokemon used that same context.
- After: Added buildContextForPokemon() that creates a separate context per Pokemon with its own level, HP, friendship, and mood.
Fix 2 — Cache keys used name instead of UUID (EmbeddedAIProvider.kt)
- Before: Response caches (recentResponses, recentStructures, responseCounters) were keyed by Pokemon display name. Two Pokemon with the same species/nickname would share caches, corrupting response variety and adaptive probabilities. Also ConversationMemory was called with the name instead of UUID, so contextual responses never worked.
- After: Added pokemonId parameter. All caches now use UUID as key. No more collisions between same-name Pokemon.
Fix 3 — DialogueSystem matched wrong Pokemon (DialogueSystem.kt)
- Before: pokemons.find() always returned the first match by name. With two Pokemon of the same species, the second one never got its speech bubble.
- After: Added matchedPokemonUuids tracking set. Each dialogue is assigned to a different Pokemon entity, even if they share the same name.
Fix 4 — MultiPokemonChatSystem was Italian-only
- Before: All interaction responses (agree, disagree, joke, question, addition) and message detection (addressed to all, discussion topics, addressed Pokemon) were Italian-only.
- After: All 8 functions now use Lang.tList() for bilingual IT/EN support.
Bonus fixes
- Lang.kt — Made t() and tList() generic so they work with data classes (Fear, Secret, Belief, Legend), fixing pre-existing compile errors in PokemonLifeStory.kt and PokemonLore.kt.
- MoodSystem.kt — 16 mood descriptions + getMoodDescription() now bilingual.
- WorldContext.kt — toPromptText(), toCompactText(), and collect() (weather, time, biome) now bilingual.
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:ahpHAoW9"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JbNzzoj3:ahpHAoW9"
}
