Cobblemon Neat Bunny

Seeing accurate cobblemon health during and outside of battle

File Details

Cobblemon Neat Bunny-1.21.1-45-FABRIC.jar

  • R
  • Feb 4, 2026
  • 322.44 KB
  • 522
  • 1.21.1
  • Fabric

File Name

Cobblemon Neat Bunny-1.21.1-45-FABRIC.jar

Supported Versions

  • 1.21.1

Curse Maven Snippet

Fabric

modImplementation "curse.maven:cobblemon-neat-bunny-1438478:7574099"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

[1.21.1-45] - 2025-02-04

Added

  • Client-Side Battle HP Sync: Health bars now read from Cobblemon's client-side battle system (ClientBattlePokemon.hpValue), perfectly matching Cobblemon's native UI

    • Health bar animations are now synchronized with Cobblemon's built-in HP animations
    • No more timing mismatches between Neat's health bar and Cobblemon's battle UI
  • Ally/Enemy HP Visibility: Respects Cobblemon's game design for HP display

    • Allies (your Pokemon): Show exact HP values (e.g., "45/100")
    • Enemies (opponent Pokemon): Show percentage only (e.g., "45%")
    • New config option: cobblemonRespectEnemyHpHiding (default: true)
    • Set to false to always show exact HP for all Pokemon (reveals hidden info)

Technical Details

  • New client-side reflection system accesses:
    • CobblemonClient.INSTANCE.getBattle()ClientBattle
    • ClientBattle.getSide1() / getSide2()ClientBattleSide
    • ClientBattleSide.getActiveClientBattlePokemon()List<ActiveClientBattlePokemon>
    • ActiveClientBattlePokemon.getBattlePokemon()ClientBattlePokemon
    • ClientBattlePokemon.getHpValue(), getMaxHp(), isHpFlat(), getUuid()
  • UUID-based Pokemon matching between entity and client battle data
  • Per-tick cache for client health data to avoid redundant reflection calls
  • Graceful fallback chain: Client battle → Server battle → Pokemon base health → Entity health

Data Flow

Pokemon Entity
    ↓
Try: ClientBattlePokemon (perfect UI sync)
    ├── isHpFlat=true (ally) → hpValue is exact HP
    └── isHpFlat=false (enemy) → hpValue is ratio (0.0-1.0)
    ↓ (fallback if not found)
Server-side BattlePokemon.effectedPokemon
    ↓ (fallback if not in battle)
Pokemon.getCurrentHealth()