Data packs
Every task is a small JSON file in a data pack. You don’t have to write them by hand: the task builder fills in the fields for you and downloads a ready-made data pack. Drop the zip into your world’s datapacks folder and run /reload.
This page explains what the pieces mean, so you know what the builder is asking for.
Where tasks live
Section titled “Where tasks live”data/<namespace>/cobbletasks/tasks/<name>.jsonThe file path is the task’s id. data/mypack/cobbletasks/tasks/catch_five.json becomes mypack:catch_five. Use the same id as a built-in task to replace it. A broken file is skipped and logged, and never stops the other tasks from loading.
Fields
Section titled “Fields”A task needs these four:
| Field | What it is |
|---|---|
period | daily, weekly or event. Event tasks only run as community events. |
title | The name shown on the task screen. |
trigger | What the task counts, see Triggers. |
goal | How many times it has to happen. |
Everything else is optional:
| Field | What it does |
|---|---|
description | Extra text about the task. |
rewards, loot_table, xp, pokemon, commands, reward_text | What the player gets, see Rewards. |
weight | How likely the task is to be picked when a period starts. Higher is more likely. Default 1. |
scope | player (default) or server, see Shared tasks and events. |
requires, reset_on | Chains and streaks, see Chains and streaks. |
duration | How many minutes an event task lasts. |
A small example:
{ "period": "daily", "title": "Catch 5 Water-type Pokémon", "trigger": { "type": "cobbletasks:capture", "params": { "type": "water" } }, "goal": 5, "rewards": [ { "id": "cobblemon:ultra_ball", "count": 3 } ]}Triggers
Section titled “Triggers”The trigger is the kind of thing the task counts. It is written as { "type": "...", "params": { ... } }. Only the types below exist: an unknown type is logged as a warning and the task never progresses, so copy them exactly.
| Type | Counts |
|---|---|
cobbletasks:capture | A Pokémon is captured |
cobbletasks:battle_victory | A battle is won |
cobbletasks:battle_defeat | You lose a battle |
cobbletasks:battle_flee | You flee from a battle |
cobbletasks:pokemon_defeat | A Pokémon faints on the opposing side of your battle |
cobbletasks:evolution | A Pokémon evolves |
cobbletasks:level_up | A Pokémon levels up |
cobbletasks:use_candy | You give a Pokémon experience with a candy |
cobbletasks:heal | A Pokémon is healed with an item |
cobbletasks:hatch | An egg hatches |
cobbletasks:egg_collect | You collect an egg from a daycare |
cobbletasks:fossil_revive | A fossil is revived |
cobbletasks:nickname | A Pokémon is given a nickname |
cobbletasks:trade | You complete a trade with another player |
cobbletasks:scan | You scan a Pokémon that isn’t yours with the Pokédex |
cobbletasks:fish_pokemon | A Pokémon bites on your Poké Rod |
cobbletasks:berry_harvest | You harvest a berry plant |
cobbletasks:apricorn_harvest | You harvest an apricorn |
cobbletasks:ride | You start riding a Pokémon |
cobbletasks:walk | You walk one block with a Pokémon out of its ball |
params is optional. Leave it out to count every event of that type. Each filter you set must match, and filters you leave out match anything. These are the filters:
| Filter | Value |
|---|---|
species | A species, such as pikachu |
type | An elemental type, such as water |
shiny | true for shiny only, false for non-shiny only |
opponent | wild, npc or player (battle triggers only) |
ball | The Poké Ball it was caught in, such as ultra_ball |
nature, ability, aspect | A nature, ability or form, such as adamant, intimidate or alolan |
label | A species label: legendary, mythical, ultra_beast, paradox… |
min_level, max_level | A level range, both ends included |
dimension | Where the player is, such as minecraft:the_nether |
biome | A biome such as minecraft:plains, or a biome tag with a leading # |
time | day or night |
ball, nature, ability, aspect, label and the level filters need a Pokémon in the event, so they only work on triggers that involve one (capture, evolution, level up, defeat and so on). dimension, biome and time work on every trigger.
The task builder only offers these valid choices, which is the easiest way to avoid typos.
Rewards
Section titled “Rewards”A task can give any mix of these when claimed:
- Items (
rewards): item ids with a count. - Loot table (
loot_table): one roll of any loot table. - Experience (
xp). - Pokémon (
pokemon): given to the party, or the PC when it is full. - Commands (
commands): run by the server, with%player%replaced by the claiming player. Usereward_textto tell players what it does.
Commands run with full permissions, so only install data packs you trust.
Shared tasks and events
Section titled “Shared tasks and events”Set scope to server to make one task the whole server works on together. Everyone who contributed can claim it when it’s done.
Community events
Section titled “Community events”A community event is a shared goal with a time limit, such as “catch 60 Pokémon in 30 minutes”. Make one with "period": "event" and a duration in minutes.
In single player, events start on their own every so often. On a server, an admin starts them with /cobbletasks event start. How often they run is set in the configuration.
Chains and streaks
Section titled “Chains and streaks”requireslists tasks that must be finished first. The task stays locked until they are.reset_onsets progress back to zero when something happens, for example losing a battle. This makes “win 5 battles in a row” tasks.
Milestones
Section titled “Milestones”Milestones are bonus rewards paid when a player claims every task of a period (all_complete) or keeps a streak going (streak). They live in data/<namespace>/cobbletasks/milestones/<name>.json and use the same reward fields as tasks, plus period, kind, title and, for streaks, count. The task builder doesn’t make milestones, so copy one from the built-in milestones.
