Skip to main content
Version: 3.1 · MC 1.21.1

Trainer templates

Native templates are datapack JSON resources under data/<namespace>/brecher_trainers/trainers/<name>.json. They include schema version, display identity, roster, dialogue, battle rules, AI difficulty, appearance, and behavior.

Legacy RCT-shaped resources under trainers/ remain recognized throughout 3.x for direct upgrades, but new content should use the native path. A native resource overrides the same <namespace>:<name> from the legacy path.

Reload is transactional: any invalid resource keeps the entire previous template set and runtime registry installed. Reload datapacks, then require a /trainer migration report with no malformed rosters, unresolved templates, or legacy-backed entities; the report includes the failing resource and a concise reason.

Example​

{
"schema_version": 1,
"display_name": "Ace Trainer",
"roster": [
{
"species": "cobblemon:pikachu",
"level": 35,
"moveset": ["thunderbolt"],
"evs": {"spa": 252, "spe": 252}
}
],
"dialogue": {
"on_battle_start": "dialogue.example.ace.start"
},
"battle_rules": {
"format": "singles",
"team_size": 3,
"team_preview": true,
"ai_difficulty": "hard",
"bag_item_mode": "max_3",
"bag_items": [{"item_id": "cobblemon:hyper_potion", "quantity": 2}]
},
"appearance": "minecraft:textures/entity/player/wide/steve.png",
"behavior": "stationary"
}

Dialogue values are translation keys supplied by the datapack's companion resource pack. TRIPLES remains readable but runs as singles and emits one operator warning per process.

Limits and validation​

Template JSON is limited to 1,048,576 characters, roster JSON to 262,144 characters, nesting to 64 levels, rosters to six Pokémon, moves to four per Pokémon, and bag items to ten entries.

Duplicate JSON keys, duplicate moves or stat aliases, fractional integer fields, unknown future schemas, invalid resource identifier syntax, unknown stat names, IVs outside 0–31, EVs outside 0–252, EV totals above 510, and incompatible format/team/level bounds reject the reload.

Species, moves, abilities, natures, and held items accept lowercase identifiers such as pikachu or cobblemon:pikachu; trainer bag items require an explicit cobblemon:<path> item ID. Supported stat names are hp, attack/atk, defence/defense/def, special_attack/spa, special_defence/special_defense/spd, and speed/spe.

Spawning a template​

After a successful datapack reload, use /trainer spawn <namespace:id> to create an independent entity instance backed by that template. Multiple entities may share one template while retaining distinct entity UUIDs and battle state. The command is authority-only and requires operator permission level 2.

Support the Community

Help keep our servers running and support future projects!