CobblemonTrainer banner
CobblemonTrainer icon

CobblemonTrainer

Customizable Trainers: Define trainers via YAML with names, dialogue, Pokémon teams, rewards, and skins. Spawn NPC trainers with commands, battle using...

00
fabricServer1.21.1mod

CobblemonTrainer

What it does

  • Adds server-side NPC trainers that use Cobblemon battles; trainers are invulnerable, can be fixed or movable, and reset for repeat fights.
  • Trainer definitions live in YAML (names, dialogue, Pokémon teams, rewards, skins) and are cached for spawn commands.
  • Placements are persisted between restarts and trainers heal/reset after every battle.
  • Cobblemon 1.7.1 is bundled in the jar so the dependency is present on servers automatically.

Configuration

  • Main config: config/cobblemontrainer/trainers.yml (auto-generated with an example).
  • Fields: id (unique), name, level, movable, healAfterBattle, randomizeTeamOrder, dialogue (greet/win/lose lines).
  • Team entries: species, optional level, moves, shiny, nature, ability, heldItem, aspects.
  • Rewards: experience plus reward items (id, count).
  • Skin options: type (texture/player/url), value (resource id, username, or URL), optional model (default/slim/none).
  • Placements save to config/cobblemontrainer/trainer_spawns.json when trainers are spawned.

Commands (op level 2)

  • /trainer list — show available trainer ids.
  • /trainer reload — reload YAML definitions (does not move existing NPCs).
  • /trainer spawn <id> [custom name] — spawn and persist a trainer at your position.
  • /trainer remove <target> — remove a tracked trainer NPC (selectors or look-and-target).

Interaction & rewards

  • Right-clicking a tracked NPC starts a Cobblemon trainer battle; NPCs auto-heal and rebuild their party afterward.
  • Defeating a tracked trainer grants configured XP and reward items (drops items if the inventory is full).

Notes

  • Trainers are tagged and protected from damage/projectiles using Cobblemon’s NPC entity.
  • player skins fetch Minecraft usernames; url skins download from the given URL; texture expects a namespaced resource id.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.