Skip to content

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.

data/<namespace>/cobbletasks/tasks/<name>.json

The 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.

A task needs these four:

FieldWhat it is
perioddaily, weekly or event. Event tasks only run as community events.
titleThe name shown on the task screen.
triggerWhat the task counts, see Triggers.
goalHow many times it has to happen.

Everything else is optional:

FieldWhat it does
descriptionExtra text about the task.
rewards, loot_table, xp, pokemon, commands, reward_textWhat the player gets, see Rewards.
weightHow likely the task is to be picked when a period starts. Higher is more likely. Default 1.
scopeplayer (default) or server, see Shared tasks and events.
requires, reset_onChains and streaks, see Chains and streaks.
durationHow 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 } ]
}

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.

TypeCounts
cobbletasks:captureA Pokémon is captured
cobbletasks:battle_victoryA battle is won
cobbletasks:battle_defeatYou lose a battle
cobbletasks:battle_fleeYou flee from a battle
cobbletasks:pokemon_defeatA Pokémon faints on the opposing side of your battle
cobbletasks:evolutionA Pokémon evolves
cobbletasks:level_upA Pokémon levels up
cobbletasks:use_candyYou give a Pokémon experience with a candy
cobbletasks:healA Pokémon is healed with an item
cobbletasks:hatchAn egg hatches
cobbletasks:egg_collectYou collect an egg from a daycare
cobbletasks:fossil_reviveA fossil is revived
cobbletasks:nicknameA Pokémon is given a nickname
cobbletasks:tradeYou complete a trade with another player
cobbletasks:scanYou scan a Pokémon that isn’t yours with the Pokédex
cobbletasks:fish_pokemonA Pokémon bites on your Poké Rod
cobbletasks:berry_harvestYou harvest a berry plant
cobbletasks:apricorn_harvestYou harvest an apricorn
cobbletasks:rideYou start riding a Pokémon
cobbletasks:walkYou 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:

FilterValue
speciesA species, such as pikachu
typeAn elemental type, such as water
shinytrue for shiny only, false for non-shiny only
opponentwild, npc or player (battle triggers only)
ballThe Poké Ball it was caught in, such as ultra_ball
nature, ability, aspectA nature, ability or form, such as adamant, intimidate or alolan
labelA species label: legendary, mythical, ultra_beast, paradox…
min_level, max_levelA level range, both ends included
dimensionWhere the player is, such as minecraft:the_nether
biomeA biome such as minecraft:plains, or a biome tag with a leading #
timeday 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.

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. Use reward_text to tell players what it does.

Commands run with full permissions, so only install data packs you trust.

Set scope to server to make one task the whole server works on together. Everyone who contributed can claim it when it’s done.

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.

  • requires lists tasks that must be finished first. The task stays locked until they are.
  • reset_on sets progress back to zero when something happens, for example losing a battle. This makes “win 5 battles in a row” tasks.

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.