Action
Actions are used to operate on a given context. Actions can change or affect the world and/or its entities depending on the specified type.
Custom actions can be defined as JSON/JSON5/JSONC files in the data/<namespace>/kaya/action directory of a data pack. Data packs that load later with an action file with the same name and directory will replace the existing action.
Note
Some actions require certain context parameters to function properly. Make sure to check the page for the desired action type for more information.
Format
| Field | Type | Default | Description |
|---|---|---|---|
type |
Identifier | The identifier of the desired action type. |
Tip
Specifying certain data types will implicitly use a specific type:
| Data Type | Action Type |
|---|---|
| Array of Actions | sequence |
Empty Object ({}) |
nothing |
Meta types
conditional/compositeconditionalloopnothingprovide_contextrandom_chancereferencesequencesideweighted
Types
add_velocityapply_effectsarea_of_effectbone_mealclear_powersconsume_itemdamage_entitydamage_itemdismountemit_game_eventexecute_commandexhaustexplodeextinguish_entity_firegain_airgive_itemsgrant_powermodify_block_state_propertymodify_itemmountplace_blockplay_soundremove_powerrevoke_all_powersrevoke_powerset_entity_on_fireset_resource/floatset_resource/intshoot_entityspawn_particlesswing_handtametoggle_powertrigger_power_cooldown