Перейти к содержимому
Mineforgian

CRZ:CobblemonFieldMoves

Server-side Fabric mod for Minecraft 1.21.1 + Cobblemon. Use your Pokemon's moves in the overworld while riding them.

Загрузки
2K
Подписчики
6
Обновлён
8 марта 2026 г.
Лицензия
MIT

Опубликован 9 февраля 2026 г.

obblemonFieldMoves

Server-side Fabric mod for Minecraft 1.21.1 + Cobblemon. Use your Pokemon's moves in the overworld while riding them.

Commands

                                                                                                                                                                                                                                                                                        
┌──────────────────┬──────────────────────────┐                                                                                                                                                                                   
│     Command      │       Description        │
├──────────────────┼──────────────────────────┤
│ /fm              │ Show clickable move list │
├──────────────────┼──────────────────────────┤
│ /fm use <1-4>    │ Use a move by slot       │
├──────────────────┼──────────────────────────┤
│ /fieldmoves help │ Show help                │
└──────────────────┴──────────────────────────┘

Features

  • Ride & Fight - Use any of your Pokemon's 4 moves against mobs, players, animals, and wild Pokemon outside of battle
  • Click-to-Use - Color-coded move list in chat with hover info (type, power, PP) — no GUI needed
  • Real Damage Formula - Pokemon damage formula with STAB, type effectiveness vs vanilla mobs (Blaze=Fire, Creeper=Grass, etc.), crits, and distance falloff
  • Move Categories - Special = ranged projectile, Physical = melee AoE cone, Status = self-buffs or AoE debuffs
  • Native Particles & Animations - Cobblemon's Snowstorm particles and animations for 100+ moves, with custom sequences for iconic moves (Hyper Beam, Thunder, Psychic, etc.)
  • Status Effects - Fire burns, Ice slows, Electric paralyzes, Poison poisons, Psychic confuses, etc.
  • Pose-Aware - Adapts to flying, hovering, swimming, or grounded Pokemon
  • PP & Cooldown - Optional PP consumption and per-player cooldowns
  • Target Filters - Toggle PvP, mob, animal, and Pokemon damage separately
  • API & Events - Full API for plugins; PRE/POST events for mod integration
  • Voice Commands - Optional, via Simple Voice Chat + Vosk (free) or Whisper (paid)
  • Configurable - Everything tweakable in cobblemonfield.json

Ченджлог

2.2.0Релиз1.21.1 · 8 марта 2026 г.

CobblemonFieldMoves v2.2.0 — What's New

Animation Timing Fix
Move animations now sync properly with Cobblemon's native animations. We analyzed the actual animation data from Cobblemon's source — every battle animation (physical, special, status) lasts exactly 3 seconds. Effects and projectiles are now timed to match the real contact frame of each animation, so your Pokemon fully winds up before the move fires.

Projectile Origin Fix Ranged moves like Flamethrower now start from your Pokemon's actual mouth position, calculated using each species' real eye height and body width data. No more fire randomly shooting from the middle of the body.

Smart Targeting Your Pokemon now automatically finds and aims at the nearest target instead of relying on where the player is looking. This fixes the issue where sent-out (non-ridden) Pokemon would fire moves in the wrong direction.

Pokemon Approaches the Target Before executing a move, your Pokemon will now walk toward the target using Minecraft's pathfinding system. Physical moves get up close (2.5 blocks), ranged moves stop at firing distance (8 blocks). No more attacking from across the field without moving.

Persistent Facing Pokemon now properly lock onto their target throughout the entire move animation. Previously, the AI would override the rotation and the Pokemon would look away mid-attack. Now it stays locked on using Minecraft's look control system.

2.0.0Релиз1.21.1 · 5 марта 2026 г.

Bug Fixes

  1. Memory leak - When players disconnected, some tracking data (particle rate limits, special effect timers) was never cleaned up. Over time on busy servers, this would slowly eat memory. Now everything gets properly cleaned when a player leaves.
  2. Disabled players could bypass restrictions - If a server admin disabled field moves for a player (e.g. for griefing), the player could just reconnect to get them back. Now the disabled status persists until the server restarts or an admin re-enables it.
  3. Status effects were always guaranteed - Every fire move would always burn, every ice move would always freeze. In real Pokemon games, these have a chance (not 100%). Now fire has 30% burn chance, ice 20% freeze, electric 25% paralysis, etc.
  4. Wrong controls shown in help - The /fieldmoves help command said "Left Click = Use move" but the actual controls are Right Click to use and Shift+Right Click to cycle. Fixed the help text to match reality.
  5. Voice commands could misfire on short words - If speech recognition picked up a short sound like "a", it could accidentally match a move. Now voice input must be at least 3 characters to do a fuzzy match.
  6. Voice system broke on server restart - In singleplayer, stopping and restarting a world would crash the voice command system because the background worker couldn't be restarted. Now it properly recreates itself.
  7. Unsafe code that could crash - One spot used a !! (force unwrap) that could theoretically crash the server. Replaced with a proper null safety check.

Performance Improvements

  1. Particle data is now cached - Every time a Pokemon used a move, the mod was building lists of 40-80 particle names from scratch. Now it builds them once and reuses them. Huge reduction in garbage collection pressure.
  2. Type chart was rebuilt on every hit - The full Pokemon type effectiveness table (18 types x all matchups) was being recreated as a new object every single time damage was calculated. Now it's created once at startup.
  3. Move category lookups are now instant - Over 20 sets of move names (mouth moves, hand moves, kick moves, etc.) were being recreated every time a move was used. Now they're pre-built constants.
  4. Move name normalization is cached - Converting move names like "Ice_Beam" to "icebeam" was happening 8-10 times per single move use. Now it's done once and remembered.
  5. Config saves are smarter - Changing multiple settings at once (e.g. from a plugin) used to write the config file to disk for each change. Now there's a batch mode that writes once at the end.
  6. Removed duplicated code - The type-to-color mapping function (Normal=white, Fire=red, Water=blue...) was copy-pasted in two files. Now there's one shared version.
2.0.0Релиз1.21.1 · 23 февраля 2026 г.
  1. Cobblemon 1.7.3 Compatibility
  • Analyzed the entire mod codebase and all Cobblemon API usage (PokemonEntity, Move, DamageCategories, ActionEffects, Snowstorm particles, etc.)
  • Researched Cobblemon 1.7.1 → 1.7.3 changelogs - confirmed no breaking API changes
  • Updated mod/build.gradle.kts to compile against Cobblemon 1.7.3+1.21.1 (was 1.7.1)
  1. Single Player Fix (Root Cause)
  • Found that fabric.mod.json had "environment": "server" which tells Fabric to only load the mod on dedicated servers
  • In single player, the game runs as a client with an integrated server - so the mod was completely ignored
  • Changed to "environment": "*" so the mod loads on both client and dedicated server
  • The code was already safe for single player (all events are server-side, UseEntityCallback already checks world.isClientSide)
2.0.0Релиз1.21.1 · 22 февраля 2026 г.

CobblemonFieldMoves v2.0.0 - Combo System Update

What's New

Players can now combo with their Pokemon against both mobs and other players! Attack with your sword using left-click while your Pokemon uses its moves with right-click — at the same time.

Controls

  • Left-click — Normal player attack (sword, axe, fist, etc.)
  • Right-click on target — Pokemon uses its selected field move
  • Shift + Right-click — Cycle to the next move

How it works

Send out your Pokemon or ride it, then engage any mob or player. You swing your weapon with left-click while commanding your Pokemon to attack with right-click. Both hits land independently, enabling true combo gameplay between trainer and Pokemon.

Bug Fixes

  • Fixed beam particles going everywhere — Moves like Flamethrower, Ice Beam, and Thunderbolt now display clean particle effects instead of spawning fire/ice/lightning all over the place
  • Fixed move targeting when not riding — When the Pokemon is sent out (not mounted), moves now correctly aim at the entity you click on instead of missing the target
1.2.0Релиз1.21.1 · 22 февраля 2026 г.

Fix 1: Particles going everywhere (beam moves)

Problem: Beam moves like Flamethrower, Ice Beam, Thunderbolt etc. spawned fire/ice/lightning particles all over the place instead of in a straight line.

Root cause: The code was spawning _actor Snowstorm particles (complex animated effects designed to play ON a Pokemon entity) as world particles at multiple positions along the beam (distances 2, 5, 8 blocks). Each one played its full animation independently, creating 6 separate fire/ice sources.

Fix:

  • Removed all _actor world particles from beam paths in spawnSpecialMoveEffects()
  • The entity particles on the Pokemon (already spawned in execute() at tick 6) handle the visual attack from the Pokemon
  • spawnSpecialMoveEffects() now only spawns _target particles at the impact point
  • Applied to all 26+ beam moves (Flamethrower, Ice Beam, Thunderbolt, Psychic, Hydro Pump, Shadow Ball, etc.)
  • Added getBeamStartPosition() helper that uses the player's look direction for the beam origin offset (not the Pokemon's facing direction)
  • Fixed fallback trail guard to skip trails for moves that already have native Cobblemon entity particles
  • Reduced special effects cooldown from 1500ms to 800ms since effects are much lighter now

Fix 2: Moves not targeting clicked entities

Problem: When the player was NOT riding the Pokemon (Pokemon sent out nearby), clicking on a mob would fire the move but it would miss the target completely.

Root cause: executeRangedMoveInternal() calculated the beam direction using player.lookAngle starting from the Pokemon's position. Since the Pokemon was far from the player, the ray pointed in a completely different direction than the clicked mob.

Fix:

  • Passed the clickedTarget (the entity the player left-clicked) through the entire call chain: CobblemonFieldMod → FieldMoveHandler → MoveExecutor.execute() → executeRangedMoveDelayed() → executeRangedMoveInternal()
  • Same for melee: → executeMeleeMoveDelayed() → executeMeleeMoveInternal()
  • When clickedTarget exists, lookAngle is now calculated as the direction from the Pokemon to the target instead of using the player's look direction
  • For melee moves, the hitbox is centered on the clicked target for reliable hit detection
1.1.1Релиз1.21.1 · 13 февраля 2026 г.

Fix 1: Multi-Pokemon Chat Spam (CobblemonFieldMod.kt)

  • Problem: registerMountDetection() ran every tick and picked the closest Pokemon. With 2+ Pokemon sent out, the "closest" one kept changing as they walked around, triggering 5-8 chat messages each time it switched.
  • Fix:
    • Stable UUID tracking: Once a sent-out Pokemon is detected, it stays tracked until it's recalled, dies, or goes out of range (64 blocks). No more flickering between Pokemon.
    • Riding check stays every tick (O(1), just checks player.vehicle)
    • Sent-out Pokemon check throttled to every 20 ticks (1 second) instead of every tick
    • Only searches for a new Pokemon when the currently tracked one becomes invalid

Fix 2: Logger Spam Reduction

  • CobblemonFieldMod.kt: Changed LOGGER.info() to LOGGER.debug() for per-action logs (move cycling, attack detection). Reduced init logging from ~15 messages to 2.
  • FieldMoveHandler.kt: Changed LOGGER.info() to LOGGER.debug() for "executing move", "cancelled by event", "executed successfully".
  • MoveExecutor.kt: Changed LOGGER.info() to LOGGER.debug() for move execution, ActionEffect execution, ranged hit damage, and melee hit damage logs.
  • FieldMoveConfig.kt: Reduced config init from ~20 verbose log lines to 2 essential messages (loaded/created).
1.1.1Релиз1.21.1 · 12 февраля 2026 г.

CobblemonFieldMoves - Server-Side Only Refactor

  1. Removed Client-Side Dependencies
  • Deleted CobblemonFieldClient.kt - Removed the client entrypoint that intercepted mouse clicks (left-click to attack, right-click to cycle moves)
  • Deleted FieldMovePayloads.kt - Removed the custom C2S network packet (UseMoveC2SPayload) that the client sent to the server
  • Deleted DiscParticleEmitterShapeMixin.java - Removed a client-only mixin that patched Cobblemon's particle crash
  • Updated fabric.mod.json - Changed environment from "*" to "server", removed "client" entrypoint, removed "mixins" section
  • Updated cobblemonfield.mixins.json - Removed the "client" array (no more mixins)
  • Updated CobblemonFieldMod.kt - Removed C2S packet registration (PayloadTypeRegistry, ServerPlayNetworking)
  1. Added Server-Side Attack Interception
  • AttackEntityCallback.EVENT in CobblemonFieldMod.kt - When a player left-clicks an entity while having an active Pokemon (riding or sent-out), the selected field move is executed instead of a normal attack. Shift + left-click cycles to the next move.
  1. Added Auto-Show Moves on Pokemon Activation
  • ServerTickEvents.END_SERVER_TICK in CobblemonFieldMod.kt - Detects when a player mounts a Pokemon or sends one out. Automatically displays a clickable move menu in chat and resets the selected move to slot 1.
  1. Added Server-Side Move Selection Tracking
  • FieldMoveHandler.kt - Added selectedMoves map, plus getSelectedMove(), setSelectedMove(), cycleMove(), and clearSelectedMove() methods to track which move each player has selected.
  1. Support for Sent-Out (Non-Mounted) Pokemon
  • FieldMoveHandler.findPlayerPokemon() - New helper that finds a player's active Pokemon by: a. Checking if the player is riding a PokemonEntity b. If not, searching for a nearby PokemonEntity (within 32 blocks) owned by the player
  • Updated FieldMoveHandler.handleMoveRequest() - Uses findPlayerPokemon() instead of only checking player.vehicle
  • Updated FieldMoveCommand.kt - /fm and /fm use <1-4> now work with sent-out Pokemon too
  • Updated CobblemonFieldAPI.kt - getPlayerMount() uses the new helper

Player Experience (No Client Mod Required)

  • Send out or mount a Pokemon → move menu appears in chat (clickable)
  • Left-click an entity → uses the selected move
  • Shift + left-click → cycles to the next move (shown in action bar)
  • /fm → shows move menu | /fm use <1-4> → uses a specific move
  • Cobblemon particles and animations still work (players already have Cobblemon installed)
1.0.1Релиз1.21.9, 1.21.10, 1.21.11 · 11 февраля 2026 г.

Fix: Cobblemon DiscParticleEmitterShape crash (bound must be finite and positive)

Root cause: Cobblemon's DiscParticleEmitterShape.getNewParticlePosition() calls Random.nextDouble(radius) where the radius is resolved from a MoLang expression (e.g. q.entity_radius * 0.95). When the entity radius evaluates to 0, negative, or NaN, nextDouble() throws IllegalArgumentException because it requires a finite positive bound. This affects ~10 particle files that use emitter_shape_disc without clamping the radius (psychic_target,
dragonclaw_aura, shrooms, bodyslam_actor_dust, superfang, waterpulse, infestation, etc.).

Fix: A client-side Mixin in the CobblemonFieldMoves mod that redirects the Random.nextDouble(bound) call inside getNewParticlePosition() to return 0.0 when the bound is invalid, instead of crashing.

Комментарии

Загружаем…