Skip to main content
Version: 26.1+

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:

data/<namespace>/palladium/power/<filename>.json
{
"name": "Example Power",
"icon": "minecraft:command_block"
}

Settings​

FieldTypeDefaultRequiredDescription
parentIdentifier—NoID of another power to mark it as a parent. More about that on "Parenting Powers"
nameText Component—YesDisplay name shown in the power screen and tooltips. Supports Vanilla Minecraft text components.
iconIcon—YesIcon rendered in the power list and tree view.
persistent_dataBooleanfalseNoWhen true, ability state (enabled/unlocked) is preserved across power removal and re-granting.
hiddenBooleanfalseNoHides the power from all UI. Useful for internal/system powers.
animation_controllerMap<Animation Layer, Identifier>—NoMaps animation layers to animation controller IDs.
abilitiesMap<String, Ability>—NoNamed ability definitions. The key becomes the ability's internal ID within this power.
energy_barsMap<String, EnergyBarConfiguration>—NoNamed 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.

FieldTypeDefaultDescription
titleText Component—Custom display name. Falls back to the ability type's default name.
iconIconBarrier itemIcon shown in the ability list and bar.
descriptionAbility Description—Description shown in the ability tooltip. More below.
colorAbility ColorgrayColor of the frame in the ability bar.
hidden_in_guiBooleanfalseHides the ability from the power screen.
hidden_in_barBooleanfalseHides the ability from the ability bar HUD.
list_indexInteger-1Explicit position in the ability bar. -1 = automatic.
animation_timerAnimation Timer—Controls how long the ability's animation blends in/out.
render_layerList<Identifier>[]Render layer IDs to activate while this ability is enabled.
allow_dampeningBooleantrueWhether 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.

  • linear
  • constant
  • in_sine, out_sine, in_out_sine
  • in_quad, out_quad, in_out_quad
  • in_cubic, out_cubic, in_out_cubic
  • in_quart, out_quart, in_out_quart
  • in_quint, out_quint, in_out_quint
  • in_expo, out_expo, in_out_expo
  • in_circ, out_circ, in_out_circ
  • in_back, out_back, in_out_back
  • in_elastic, out_elastic, in_out_elastic
  • in_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.

FieldTypeDescription
energy_barStringKey of the energy bar within this power, or "namespace:power_id#bar_key" to reference another power's bar.
amountIntegerAmount 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
}
}
FieldTypeDefaultDescription
maxInteger or Value—Required. Maximum value of the bar. Can be a static number or a dynamic Value.
colorHex StringffffffBar fill color as an RRGGBB hex string.
synced_valueValue—When set, the bar mirrors this external value instead of being managed by the system.
auto_increase_per_tickInteger0Amount added to the bar automatically each interval.
auto_increase_intervalInteger1Ticks between each auto-increase step.
visibleConditiontrueWhether 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:

CommandWhat 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:

  1. The screen_layout field of the power's power renderer. If the renderer at assets/<namespace>/palladium/power_renderers/<power_id>.json sets screen_layout, that layout is used.
  2. The naming convention <namespace>:power/<power_path>. If no screen_layout is set or if no power renderer exists, Palladium looks for a layout whose ID is the power's ID prefixed with power/. For the power mypack:hero, that is the layout mypack:power/hero, meaning the file assets/mypack/palladium/ui_layouts/power/hero.json.
  3. 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.
warning

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.