Built-in Types
- Attribute modification
- Potion effects
- Script execution
- Shiny chance boost
Journey includes a powerful and extensible buff system that allows you to grant temporary or permanent effects to players as rewards, bonuses, or through other gameplay mechanics.
Buffs are effects that modify player attributes, apply status effects, execute scripts, or interact with game systems like Cobblemon. They can be:
Built-in Types
Extensible
Third-party mods can add custom buff types through the BuffTypeRegistry
Integration
Buffs can be granted as:
Persistent
Buffs survive:
Modify player attributes like movement speed, attack damage, health, etc.
Operations:
add_value - Adds flat value to attributeadd_multiplied_base - Adds percentage of base valueadd_multiplied_total - Multiplies total valueExample:
{ "id": "speed_boost", "type": "attribute", "name": "Speed Boost", "description": "Increases movement speed by 20%", "max_stacks": 1, "is_debuff": false, "hidden": false, "attribute": "minecraft:generic.movement_speed", "operation": "add_multiplied_base", "value": 0.2}Apply Minecraft potion effects with custom settings. Every potion effect can be used.
Example:
{ "id": "regeneration", "type": "potion", "name": "Regeneration", "description": "Slowly restores health", "max_stacks": 1, "is_debuff": false, "hidden": false, "potion_effect": "minecraft:regeneration", "show_particles": false, "show_icon": true, "ambient": false}Execute MoLang scripts when buff is applied, ticked, or removed.
Available Scripts:
on_apply_script - Runs once when buff is appliedon_tick_script - Runs periodically based on tick_intervalon_remove_script - Runs once when buff is removedScript Context:
q.player.* functions)query.amplifier(), query.remaining_ticks(), query.buff_duration())Example:
{ "id": "explorers_celebration", "type": "script", "name": "Explorer's Celebration", "description": "A burst of energy celebrates your achievement", "max_stacks": 1, "is_debuff": false, "hidden": false, "on_apply_script": "q.player.tell_minimessage('<gold>✨ You feel a surge of explorer\\'s energy! ✨</gold>')", "on_tick_script": "query.random(1, 100) > 90 ? q.player.snowstorm_particle('journey:sparkle', query.position_x + query.random(-1, 1), query.position_y + query.random(0, 2), query.position_z + query.random(-1, 1)) : 0", "on_remove_script": "q.player.tell_minimessage('<gray>The explorer\\'s energy fades...</gray>')", "tick_interval": 20}Increase the chance of encountering shiny Pokémon (Cobblemon integration).
How it Works:
Example:
{ "id": "shiny_hunter", "type": "shiny_chance", "name": "Shiny Hunter", "description": "Increases your chance of encountering shiny Pokémon", "max_stacks": 3, "is_debuff": false, "hidden": false, "chance_increase": 100.0}Buff definitions are stored as JSON files in:
config/journey/buffs/Each buff should be in its own .json file. On first run, Journey creates several example buffs.
All buff types share these properties:
| Property | Type | Default | Description |
|---|---|---|---|
id | String | Required | Unique identifier for the buff |
type | String | Required | Buff type: attribute, potion, script, shiny_chance |
name | String | null | Display name shown to player |
description | String | null | Description shown to player |
max_stacks | Integer | 1 | Maximum number of instances allowed |
is_debuff | Boolean | false | Whether this is a negative effect |
hidden | Boolean | false | Whether to hide from player UI |
| Property | Type | Required | Description |
|---|---|---|---|
attribute | String | Yes | Minecraft attribute identifier |
operation | String | Yes | add_value, add_multiplied_base, or add_multiplied_total |
value | Number | Yes | Value to apply (meaning depends on operation) |
| Property | Type | Default | Description |
|---|---|---|---|
potion_effect | String | Required | Minecraft potion effect identifier |
show_particles | Boolean | true | Show particle effects |
show_icon | Boolean | true | Show effect icon in inventory |
ambient | Boolean | false | Ambient effect (lighter particles) |
| Property | Type | Default | Description |
|---|---|---|---|
on_apply_script | String | "" | MoLang script to run on apply |
on_tick_script | String | "" | MoLang script to run periodically |
on_remove_script | String | "" | MoLang script to run on remove |
tick_interval | Integer | 20 | Ticks between on_tick_script executions |
| Property | Type | Required | Description |
|---|---|---|---|
chance_increase | Number | Yes | Amount to increase shiny chance by |
Buffs can be granted when tasks are completed:
{ "name": "catch_first_pokemon", "display_name": "Catch Your First Pokémon", "rewards": [ { "type": "buff", "data": { "buff_id": "shiny_hunter", "duration": 6000, "amplifier": 0, "source": "first_catch_task" } } ]}Buffs can be granted when players level up a levelable:
{ "name": "Pokemon Breeder", "description": ["Become an expert at breeding Pokémon!"], "levels": [ { "level": 5, "required_experience": 1000, "rewards": [ { "type": "buff", "data": { "buff_id": "shiny_hunter", "duration": -1, "amplifier": 1, "source": "breeder_levelable" } } ] } ]}| Property | Type | Description |
|---|---|---|
buff_id | String | ID of the buff definition to apply |
duration | Integer | Duration in ticks (20 ticks = 1 second), -1 for permanent |
amplifier | Integer | Buff level (0-based, 0 = base effect, 1 = enhanced, etc.) |
source | String | Optional source identifier for tracking/removal |
Duration is specified in ticks (20 ticks = 1 second):
200 = 10 seconds600 = 30 seconds1200 = 1 minute6000 = 5 minutes-1 = Permanent/infiniteAmplifier is 0-based and affects buffs differently:
Attribute Buffs: Value is multiplied by (amplifier + 1)
value * 1 (100% of value)value * 2 (200% of value)value * 3 (300% of value)Potion Buffs: Passed directly to potion effect
Script Buffs: Available as query.amplifier() in scripts
Shiny Chance Buffs: Chance is multiplied by (amplifier + 1)
chance_increase * 1chance_increase * 2chance_increase * 3Buffs can have multiple instances active based on max_stacks:
max_stacks: 1)max_stacks: 2+)Example: Shiny Hunter with max_stacks: 3
The source field in buff rewards allows tracking where buffs came from:
For levelable rewards, use: "{levelable_name}_levelable"
Example:
{ "buff_id": "speed_boost", "duration": -1, "source": "explorer_levelable"}When the “Explorer” levelable is removed, all buffs with source "explorer_levelable" are automatically removed.
Apply a buff to a player:
/journey buff apply <player> <buff_id> [duration] [amplifier]Parameters:
<player> - Target player<buff_id> - Buff identifier (just the name, e.g., speed_boost not journey:speed_boost)[duration] - Optional duration in ticks (-1 for permanent, defaults to permanent)[amplifier] - Optional amplifier level (defaults to 0)Examples:
/journey buff apply @p speed_boost 600 0/journey buff apply AmoAster shiny_hunter -1 2Remove a specific buff from a player:
/journey buff remove <player> <buff_id>Example:
/journey buff remove @p speed_boostRemove all buffs from a player:
/journey buff clear <player>Example:
/journey buff clear @pList all active buffs on a player:
/journey buff list <player>Example:
/journey buff list @pReload all buff configurations from disk:
/journey buff reloadThird-party mods can register custom buff types using the BuffTypeRegistry API.
Grant a 30-second speed boost when player completes a task:
Buff Definition (config/journey/buffs/task_speed.json):
{ "id": "task_speed", "type": "attribute", "name": "Task Completion Rush", "description": "Temporary speed boost for completing a task!", "max_stacks": 1, "is_debuff": false, "hidden": false, "attribute": "minecraft:generic.movement_speed", "operation": "add_multiplied_base", "value": 0.3}Task Configuration:
{ "name": "explore_village", "display_name": "Explore the Village", "rewards": [ { "type": "buff", "data": { "buff_id": "task_speed", "duration": 600, "amplifier": 0 } } ]}Grant permanent shiny boost when player reaches Breeder level 10:
Levelable Configuration:
{ "name": "Pokemon Breeder", "levels": [ { "level": 10, "required_experience": 10000, "rewards": [ { "type": "buff", "data": { "buff_id": "shiny_hunter", "duration": -1, "amplifier": 2, "source": "breeder_levelable" } } ] } ]}Create a celebratory buff with particles when player achieves something:
Buff Definition:
{ "id": "celebration", "type": "script", "name": "Celebration!", "description": "You did something amazing!", "max_stacks": 1, "is_debuff": false, "hidden": false, "on_apply_script": "q.player.tell_minimessage('<rainbow>✨ AMAZING! ✨</rainbow>'); q.player.play_sound('minecraft:entity.player.levelup', 1.0, 1.0)", "on_tick_script": "q.player.snowstorm_particle('minecraft:happy_villager', query.position_x + query.random(-1, 1), query.position_y + query.random(0, 2), query.position_z + query.random(-1, 1))", "on_remove_script": "q.player.tell_minimessage('<gray>Back to normal!</gray>')", "tick_interval": 10}Use descriptive, lowercase IDs with underscores:
shiny_hunter, speed_boost, mining_hastebuff1, SpeedBoost, shiny-hunterFor readability, use these common durations:
{ "duration": 200, // 10 seconds "duration": 600, // 30 seconds "duration": 1200, // 1 minute "duration": 6000, // 5 minutes "duration": 12000, // 10 minutes "duration": -1 // Permanent}Use consistent source naming:
"{levelable_name}_levelable""{task_name}_task""{mod_id}_{feature_name}"max_stacks: 1 for unique buffs that shouldn’t stackUse hidden: true for:
Check:
config/journey/buffs/ directory.json extensionCheck:
Check:
add_value, add_multiplied_base, add_multiplied_totalCheck: