Skip to content

Power

Powers give a certain "ability" to the entity it's granted to. The functionality of the "ability" will depend on the specified type.

Custom powers can be defined as JSON/JSON5/JSONC files in the data/<namespace>/kaya/power directory of a data pack. Data packs that load later with a power file with the same name and directory will replace the existing power.

Note

Power types provide the context used by other context-based data objects, such as actions and conditions, for flexibility. Some power types may provide more context parameters, so make sure to check the corresponding pages for your desired power type.

Tip

Most if not all power types automatically provides the kaya:this_entity context parameter, which would refer to the entity holding the power.

Format

Field Type Default Description
type Identifier The identifier of the desired power type.
name Text Component optional The display name of the power, prioritizing translations from resource packs.

If unspecified, a translatable name with the key power.<namespace>.<path>.name is provided.
description Text Component optional The display description of the power, prioritizing translations from resource packs.

If unspecified, a translatable name with the key power.<namespace>.<path>.description is provided.
hidden Boolean false Determines whether the power should be hidden.
Powers and its active_condition

A power, unless stated otherwise by its type, supports an optional active_condition field which determines whether the power is considered active. If the field is absent, the power will be considered as always active.

Callback types

Modifying types

Types