
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/loselines). - Team entries:
species, optionallevel,moves,shiny,nature,ability,heldItem,aspects. - Rewards:
experienceplus rewarditems(id,count). - Skin options:
type(texture/player/url),value(resource id, username, or URL), optionalmodel(default/slim/none). - Placements save to
config/cobblemontrainer/trainer_spawns.jsonwhen 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.
playerskins fetch Minecraft usernames;urlskins download from the given URL;textureexpects a namespaced resource id.
Server Validation
✅ Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.