
Cobblemon OP
here is prompt Add per-Pokémon stat boosts (HP/ATK/DEF/SpA/SpD/SPE) that modify real stats and client UI; persist per Pokémon (UUID-keyed) in server saved...
00—cobblemon-neoforgeBoth1.21.1mod
Cobblemon OP – Stat Boost Addon
What was built
- Added a stat-boosting system for Cobblemon that wraps the Cobblemon
StatProvideron both server and client, so HP/ATK/DEF/SpA/SpD/SPE values reflect boosts in battles and UI. - Boost data is stored per-Pokemon (UUID-keyed) in each Pokemon's persistent NBT and cached in memory. Missing data defaults to zero without crashes.
- Server-to-client sync targets the Pokemon owner only (login, party changes, boost edits, manual sync). The client keeps a UUID-keyed cache and refreshes health when boosts arrive.
Commands (/coboost)
view <pokemon>orview <player> <pokemon>– show boosts for a party Pokemon (non-admins can only view their own).set <player> <pokemon> <stat> <value>– set an absolute boost.add <player> <pokemon> <stat> <delta>– add/subtract from the current boost.reset <player> <pokemon>– clear boosts and re-enable clamping.uncap <player> <pokemon> <on|off>– disable/enable the default clamp (-1024 to 1024) per Pokemon.sync <player>– resend the owner-only cache to an online player.
Selectors & Suggestions
- Stats:
hp atk def spa spd spe. - Pokemon selector: party slot
1-6,selected(first non-empty party slot), or a Pokemon UUID. - Player suggestions use known profiles; non-admins may only target themselves.
Notes & behavior
- Boosts persist with the Pokemon (trades, saves) and auto-load from persistent NBT; missing tags are treated as zero.
- Health is clamped to the new max after boosts change without reviving fainted Pokemon.
- The same JAR runs on both server and client; no client-only code is placed in shared logic.
- Only the six primary stats are affected; accuracy/evasion remain unchanged.