Powers
Powers are the main feature of Palladium. They are essentially a collection of configured abilities that can be granted
to a player.
As they are datapack content, they go into data directory and can be reloaded by rejoining the world. The minimal
setup for a power would be:
{
"name": "Example Power",
"icon": "minecraft:command_block"
}
Settings
| Field | Type | Default | Required | Description |
|---|---|---|---|---|
parent | Identifier | — | No | ID of another power to mark it as a parent. More about that on "Parenting Powers" |
name | Text Component | — | Yes | Display name shown in the power screen and tooltips. Supports Vanilla Minecraft text components. |
icon | Icon | — | Yes | Icon rendered in the power list and tree view. |
persistent_data | Boolean | false | No | When true, ability state (enabled/unlocked) is preserved across power removal and re-granting. |
hidden | Boolean | false | No | Hides the power from all UI. Useful for internal/system powers. |
animation_controller | Map<Animation Layer, Identifier> | — | No | Maps animation layers to animation controller IDs. |
abilities | Map<String, Ability> | — | No | Named ability definitions. The key becomes the ability's internal ID within this power. |
energy_bars | Map<String, EnergyBarConfiguration> | — | No | Named energy bar definitions. The key is used when referencing bars from abilities. |
Abilities
Each entry in the abilities map is an ability definition. The map key is the ability's local ID
(scoped to this power).
"abilities": {
"my_ability": {
"type": "palladium:flight",
"properties": {...},
"state": {...},
"energy_bar_usage": [
...
]
}
}
type
The registry ID of the ability type (e.g. palladium:flight, palladium:healing,
palladium:attribute_modifier). This determines which fields are available beyond the shared ones
below. A list of all available types can be found here.
state
Determines the lifecycle of the ability (when it is unlocked and enabled). Please read the Ability State Handlers page for more information.
properties
Optional display and behavior configuration for the ability.
| Field | Type | Default | Description |
|---|---|---|---|
title | Text Component | — | Custom display name. Falls back to the ability type's default name. |
icon | Icon | Barrier item | Icon shown in the ability list and bar. |
description | Ability Description | — | Description shown in the ability tooltip. More below. |
color | Ability Color | gray | Color of the frame in the ability bar. |
hidden_in_gui | Boolean | false | Hides the ability from the power screen. |
hidden_in_bar | Boolean | false | Hides the ability from the ability bar HUD. |
list_index | Integer | -1 | Explicit position in the ability bar. -1 = automatic. |
animation_timer | Animation Timer | — | Controls how long the ability's animation blends in/out. |
render_layer | List<Identifier> | [] | Render layer IDs to activate while this ability is enabled. |
allow_dampening | Boolean | true | Whether power dampening can disable this ability. |
Ability Description
Can be a single text component, or 2 ones depending on if the ability is locked or not.
"description": "Allows the player to fly."
"description": {
"locked": "You cannot fly yet.",
"unlocked": "Allows the player to fly."
}
Ability Color
One of the 16 Minecraft dye color names (lowercase):
white, orange, magenta, light_blue, yellow, lime, pink, gray,
light_gray, cyan, purple, blue, brown, green, red, black
Animation Timer
Animation timers are used as a utility for animations and render layers. They control a timer that goes up to a certain
value once the ability is enabled, and decrease again once it's disabled. Some ability type also react to the animation timer (e.g. energy beams).
Shorthand form (just max ticks):
"animation_timer": 20
Full form:
"animation_timer": {
"min": 0,
"max": 20,
"easing": "linear"
}
easing can be one of the following.
How they differ and behave can be viewed here.
linearconstantin_sine,out_sine,in_out_sinein_quad,out_quad,in_out_quadin_cubic,out_cubic,in_out_cubicin_quart,out_quart,in_out_quartin_quint,out_quint,in_out_quintin_expo,out_expo,in_out_expoin_circ,out_circ,in_out_circin_back,out_back,in_out_backin_elastic,out_elastic,in_out_elasticin_bounce,out_bounce,in_out_bounce
energy_bar_usage
Declares which energy bars this ability consumes and by how much. Accepts a single object or a list.
| Field | Type | Description |
|---|---|---|
energy_bar | String | Key of the energy bar within this power, or "namespace:power_id#bar_key" to reference another power's bar. |
amount | Integer | Amount consumed per tick while the ability is active. |
"energy_bar_usage": {"energy_bar": "stamina", "amount": 2}
"energy_bar_usage": [
{"energy_bar": "stamina", "amount": 2},
{"energy_bar": "test:other_power#mana", "amount": 1}
]
Energy Bars
Each entry in the energy_bars map defines a resource bar tracked per-player for this power.
"energy_bars": {
"stamina": {
"max": 100,
"color": "00aaff",
"auto_increase_per_tick": 1,
"auto_increase_interval": 10
}
}
| Field | Type | Default | Description |
|---|---|---|---|
max | Integer or Value | — | Required. Maximum value of the bar. Can be a static number or a dynamic Value. |
color | Hex String | ffffff | Bar fill color as an RRGGBB hex string. |
synced_value | Value | — | When set, the bar mirrors this external value instead of being managed by the system. |
auto_increase_per_tick | Integer | 0 | Amount added to the bar automatically each interval. |
auto_increase_interval | Integer | 1 | Ticks between each auto-increase step. |
visible | Condition | true | Whether the bar is shown in the ability bar. The bar keeps working while hidden. |
Visibility
visible hides the bar from the ability bar while its conditions aren't met, e.g. until the ability using it is unlocked:
"energy_bars": {
"stinger": {
"max": 8,
"auto_increase_per_tick": 1,
"auto_increase_interval": 20,
"visible": {
"type": "palladium:ability_unlocked",
"ability": "stinger"
}
}
}
Value
max and synced_value support Palladium's Value system: a type that
allows dynamic computation. A plain integer is always valid:
"max": 200
A dynamic value uses the standard type-dispatched object form:
"max": { "type": "palladium:ability_tick_count", "ability": "stamina" }
Commands
Energy bars can be read and changed with /palladium energy-bar. You always name the power and the key of the bar, both get suggested while typing:
| Command | What it does |
|---|---|
/palladium energy-bar value get <entity> <power> <energy_bar> | Shows the current value of the bar. |
/palladium energy-bar value set <entities> <power> <energy_bar> <value> | Sets the bar to the given value. |
/palladium energy-bar value add <entities> <power> <energy_bar> <amount> | Adds the amount to the bar. |
/palladium energy-bar value subtract <entities> <power> <energy_bar> <amount> | Removes the amount from the bar. |
/palladium energy-bar max get <entity> <power> <energy_bar> | Shows the current maximum of the bar. |
/palladium energy-bar max set <entities> <power> <energy_bar> <value> | Overrides the maximum, ignoring what's in the max field of the power. The override is saved. |
/palladium energy-bar max reset <entities> <power> <energy_bar> | Removes the override, so the bar uses its max field again. |
The value never goes below 0 or above the maximum. For example, filling up the stamina bar from above:
/palladium energy-bar value set @s mypack:speedster stamina 100
Bars with a synced_value mirror that value every tick, so setting their value by command won't stick.
Custom Power Screen
The screen that opens when you press the button in your inventory is a GUI layout, and every power brings its own. When a player has multiple powers, each power's layout becomes a tab of that screen.
The layout for a power is resolved in three steps, in this order:
- The
screen_layoutfield of the power's power renderer. If the renderer atassets/<namespace>/palladium/power_renderers/<power_id>.jsonsetsscreen_layout, that layout is used. - The naming convention
<namespace>:power/<power_path>. If noscreen_layoutis set or if no power renderer exists, Palladium looks for a layout whose ID is the power's ID prefixed withpower/. For the powermypack:hero, that is the layoutmypack:power/hero, meaning the fileassets/mypack/palladium/ui_layouts/power/hero.json. - The built-in default
palladium:power/default. If neither of the above exists, the power uses the default power layout, which shows the power's name at the top and the ability tree below it. How that tree is laid out can be changed with a power tree.
Only step 2 falls back to the default. If screen_layout is set to an ID that does not resolve to an existing layout,
the power gets no tab in the power screen at all. Check the ID spelling if a power disappears from the screen.