
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
536
5
Список изменений
v3.6: Defense System Disabled + Per-Pokemon Tick Optimization
Part A — PokemonDefenseSystem Disabled
- Removed PokemonDefenseSystem.register() from CRZbrainMod — no more tick handler (entity search every 1s for ALL Pokemon) and no damage listener
- Removed all PDS calls from PokemonCommandSystem — executeProtect(), executeActiveDefense(), executeAggressiveMode(), executeGuardMode(), executeStandDown() no longer call PokemonDefenseSystem
- Simplified updateDefendingState() — removed findHostilesNearPlayer() entity search, now just follows player (teleport if distance > 5.0)
- Simplified updateProtectingState() — removed findHostilesNearPlayer() entity search, now just stays near player (teleport if distance > 3.0)
- Disabled defense commands in Commands.kt — setDefenseMode(), showDefenseStatus(), showAllDefenseStatus(), activatePvPMode() all return "Sistema difesa disabilitato (v3.6)"
- Removed PDS.resetPokemon() from PokemonLifecycleManager
- Removed unused imports — PokemonDefenseSystem import removed from CRZbrainMod, Commands, PokemonCommandSystem, PokemonLifecycleManager
Part B — TickOptimizationSystem (New Unified Tick Dispatcher)
- Created sensors/TickOptimizationSystem.kt — single ServerTickEvents.END_SERVER_TICK handler replaces 3 separate handlers
- Strategy 1 — Temporal Staggering: Pokemon split into 2 groups via uuid.hashCode() % 2, updated on alternating ticks (halves peak load per tick)
- Strategy 2 — Distance-Based LOD: Pokemon >16 blocks from trainer (squaredDistanceTo > 256) skip every other update cycle (recalculated every 20 ticks)
- Strategy 3 — Frequency Reduction: Combat states stay at 10-tick interval, non-combat states (FOLLOWING, EXPLORING, DEFENDING, PROTECTING) doubled to 20 ticks; WorldEventSystem interval doubled from 600 to 1200 ticks (30s → 60s)
- Strategy 4 — Intelligent Batching: getActivePokemon() cached per player with 10-tick TTL (was called ~28 times per cycle, now 1); single player iteration loop instead of 3 separate loops
- Removed tick handler from PokemonCommandSystem — exposed updateSinglePokemon() public method, removed lastUpdateTick and UPDATE_INTERVAL
- Removed tick handler from WorldEventSystem — renamed checkWorldEvents() to checkWorldEventsForPlayer() and made it public, removed lastCheckTick and CHECK_INTERVAL_TICKS
- Removed tick handler from PokemonRelationshipSystem — added tickForPlayer() public method, removed lastInteractionTick and INTERACTION_COOLDOWN_TICKS
- Cache invalidation hooks — TickOptimizationSystem.invalidateCache() called on POKEMON_SENT_POST and DISCONNECT events; cleanup() called on SERVER_STOPPING
- handleSpontaneousDialogue() uses cached Pokemon list instead of calling PokemonUtils.hasActivePokemon() directly
- Removed unused imports — ServerTickEvents removed from WorldEventSystem, PokemonRelationshipSystem; HostileEntity/AnimalEntity/PlayerEntity removed from PokemonCommandSystem
Файлы
CRZbrain-2.1.0.jar(2.96 MiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
2.1.0
Загрузчики
Fabric
Версии игры
1.21.1
Загрузок
24
Дата публикации
2 мес. назад