Page 2 · Actions
Actions: The Building Blocks of DAI
An action is one instruction DAI knows how to execute. Datapacks combine actions into objectives, sequences, rotors, menus, builders, Survival systems, and other gameplay.
134 registered action typesCurrent 1.6 action-handler catalog.
One shared JSON shapeIndividual handlers read only the fields they need.
ComposableActions can sequence, queue, branch into, and call other behavior.
The Action JSON Shape
General action definition
{
"type": "action_type",
"action": "string",
"conditions": [],
"sequence": [],
"menu": "string",
"open": "string",
"yaw": 0.0,
"pitch": 0.0,
"direction": "string",
"ticks": 0,
"slot": 0,
"state": false,
"value": 0.0
}Only provide the fields the selected action needs. The handler-specific parameters are listed in the catalog below.
Parameter Glossary
typeRegistered action handler ID.actionGeneral string payload: resource ID, item/block/tag, waypoint, command, key, gamemode, or referenced action.conditionsConditions evaluated immediately before the atomic action executes.sequenceNested child actions used by sequence/random composition.menuMenu category used by menu actions.openSecondary string payload, commonly a menu ID.yaw / pitchCamera angle or offsets.directionMovement direction, spatial offset, or scan mode depending on the handler.ticksDuration, timeout, or action-specific tick budget.slotHotbar/container slot or generation identifier depending on handler.stateBoolean on/off value.valueGeneric numeric input such as radius, stop distance, or count.Presentation Actions
DAI 1.6 also exposes screen presentation through normal action JSON. Static sprites and sprite sheets intentionally use separate schemas.
| Action | Payload | Purpose |
|---|---|---|
overlay_sprite | sprite | Add or replace a static resource-pack texture layer. |
overlay_sprite_sheet | sprite_sheet | Add or replace an animated frame-grid layer. |
overlay_remove | action | Remove one overlay by overlay ID. |
overlay_clear | none | Clear every active DAI overlay. |
Texture assets are resource-pack content. A datapack can reference
my_pack:gui/combat/pow, while Minecraft resolves the PNG from assets/my_pack/textures/gui/combat/pow.png in an enabled resource pack.Complete Registered Action Catalog
Open any category below. The parameter column lists the fields the registered Java handler reads directly.
Menus & Screens · 4 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
pause_menu | none | Open Minecraft's pause menu. |
update_menu | menu open | Open or update a DAI menu. |
open_chat | none | Open the chat screen. |
close_screen | none | Close the currently open screen. |
Camera & Look · 2 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
set_look | yaw pitch | Set player yaw and pitch. |
add_look | yaw pitch | Add yaw/pitch offsets to the current view. |
Movement · 9 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
move | direction ticks | Move in a cardinal player-relative direction for a number of ticks. |
jump | direction ticks | Jump; optionally combine the jump with short directional movement. |
crouch_toggle | none | Toggle crouch/sneak input. |
crouch_set | state | Explicitly enable or disable crouch. |
sprint_toggle | none | Toggle sprint input. |
sprint_set | state | Explicitly enable or disable sprint. |
swim_toggle | none | Toggle managed swimming. |
swim_set | state | Explicitly enable or disable managed swimming. |
input_stop_all | none | Release/reset all DAI-managed movement input. |
Targeting & Recognition · 4 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
scan | none | Run the normal target scan. |
target_clear | none | Clear the current selected DAI target. |
recognize_target | none | Run recognition against the selected target. |
recognize_block | action value | Find a nearby block or block tag and select it as the target. |
Combat · 4 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
attack_target | none | Attack the current DAI target. |
attack_basic | none | Perform a basic attack. |
attack_start | none | Hold attack. |
attack_stop | none | Release attack. |
Automation / Compatibility · 7 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
automation_start_vanilla_gameplay compatibility | none | Automation start vanilla gameplay. |
automation_start_speedrun compatibility | none | Automation start speedrun. |
automation_start_creative_builder compatibility | none | Automation start creative builder. |
automation_start_adventure compatibility | none | Automation start adventure. |
automation_continue | none | Continue the currently configured automation lifecycle. |
speedrun_find_portal_site compatibility | open | Speedrun find portal site. |
automation_stop | none | Stop active automation and clear managed runtime work. |
Game Mode, Input & Creative · 25 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
set_gamemode | action | Request a gamemode change through Minecraft's normal command path. |
run_command | action | Submit a Minecraft command string. |
key_click | action | Click a named key once. |
key_press | action | Press/hold a named key. |
key_release | action | Release a named key. |
type_text | action | Type the supplied text through DAI's input layer. |
creative_open_inventory | none | Open the Creative inventory. |
creative_close_inventory | none | Close the Creative inventory. |
creative_select_tab | action | Select a Creative inventory tab. |
creative_search_item | action | Enter a Creative inventory search query. |
creative_take_item | action slot | Take a visible Creative item into a hotbar slot. |
creative_equip_item | action slot | Put a specified Creative item directly into a hotbar slot. |
creative_save_toolbar | none | Save a Creative toolbar preset. |
creative_load_toolbar | none | Load a Creative toolbar preset. |
creative_pick_block_nbt | none | Creative pick-block while preserving block data. |
creative_remove_block | none | Remove the selected block through the Creative helper. |
creative_place_block | none | Place the currently selected Creative block. |
creative_set_block | action | Apply a requested block-state string through the Creative helper. |
creative_flight_set | state | Enable or disable Creative flight. |
creative_fly_to | ticks value | Fly toward the current spatial destination. |
wait_for_creative_flight | slot | Wait for the active Creative flight generation to finish. |
creative_hover | ticks | Hold position in Creative flight for a number of ticks. |
creative_build_blueprint | none | Start the configured Creative blueprint build. |
creative_blueprint_cell internal | none | Nested blueprint payload type; normally not dispatched directly. |
wait_for_creative_build | slot | Wait for the active Creative build generation to finish. |
Inventory & Hotbar · 10 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
open_inventory | none | Open the player's inventory. |
hotbar_select | slot | Select a hotbar slot. |
hotbar_next | none | Select the next hotbar slot. |
hotbar_previous | none | Select the previous hotbar slot. |
hotbar_normalize | none | Normalize/reorganize the hotbar using DAI's helper. |
item_use | none | Perform a normal item-use click. |
use_start | none | Hold item use. |
use_stop | none | Release item use. |
item_drop | none | Drop the currently selected item. |
item_swap | none | Swap main-hand and off-hand items. |
Equipment Selection · 5 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
hotbar_select_item | action | Select a matching item in the hotbar. |
equip_best_tool | action | Equip the best tool, optionally for a requested target. |
equip_best_weapon | none | Equip the best available weapon. |
equip_best_food | none | Equip the best available food. |
equip_best_block | action | Equip the best matching block. |
Interaction · 2 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
interact | none | Perform a normal interaction with the current crosshair target. |
pick_block | none | Perform Minecraft's pick-block input. |
Mining & Item Collection · 8 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
break_targeted_once | none | Compatibility alias for one targeted break attempt. |
break_once | none | Perform one targeted break attempt. |
break_start | none | Hold block-breaking input. |
break_stop | none | Release block-breaking input. |
equip_best_tool_for_block | none | Equip the best tool for the selected block. |
mine_targeted_block | none | Mine the currently selected DAI block target. |
mine_nearest_block | action ticks value | Find and mine a nearby matching block. |
collect_nearby_items | action ticks value | Navigate toward and collect nearby matching item entities. |
Block Placement & Harvesting · 8 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
place | none | Perform one normal placement/use action. |
place_targeted_block | none | Place against the selected DAI target. |
place_nearest_block | ticks value | Find a nearby placement opportunity and place a block. |
place_block_at_selected_position | action ticks | Physically place a requested block at the selected exact position. |
exact_place_align internal | none | Internal smooth-look stage used by exact Creative placement. |
exact_place_finish internal | none | Internal continuation stage used by exact placement. |
exact_place_verify internal | none | Internal world-state verification stage used by exact placement. |
harvest_crop | ticks | Harvest the selected crop target. |
Navigation & Exploration · 9 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
approach_target_block | ticks value | Navigate to a reachable interaction position near the selected block. |
wait_for_approach | slot | Barrier/wait action paired with approach_target_block. |
wait_for_target_block | none | Wait until the selected block is aligned/reachable for interaction. |
explore_for_block | action ticks value | Explore until a matching block or block tag is discovered. |
wait_for_exploration | slot | Barrier/wait action paired with explore_for_block. |
vertical_scaffold_to_target | ticks value | Build/ascend a vertical scaffold toward the target. |
wait_for_vertical_scaffold | none | Wait for scaffold ascent to finish. |
vertical_scaffold_descend | ticks | Descend the current vertical scaffold. |
wait_for_scaffold_descent | none | Wait for scaffold descent to finish. |
Waypoints · 5 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
remember_waypoint | action | Save the player's current position under a waypoint name. |
remember_target_waypoint | action | Save the current selected block as a waypoint. |
select_waypoint | action | Select a named waypoint as the current target. |
forget_waypoint | action | Delete a named waypoint. |
forget_failed_waypoint | action | Remove a waypoint from failed-waypoint memory. |
Spatial / Adjacency · 6 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
select_waypoint_offset | action direction | Select a block at waypoint + offset. |
remember_offset_waypoint | action open direction | Create a waypoint at base waypoint + offset. |
remember_surface_offset_waypoint | action open direction | Create an offset waypoint normalized to the nearby walkable surface. |
scan_adjacent_blocks | action direction | Scan blocks around a target/player/waypoint into spatial state. |
select_adjacent_block | action direction | Select one adjacent block/offset from a spatial origin. |
spatial_clear | none | Clear temporary spatial scan state. |
Food · 1 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
eat_best_food | ticks | Select/use the best available food until eating completes. |
Containers & Screen Profiles · 9 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
open_container | ticks | Interact with the selected target to open a container. |
wait_for_container | ticks | Wait for a container screen to open. |
wait_for_screen_profile | action ticks | Wait for a named DAI screen profile. |
close_container | none | Close the current container screen. |
container_click_slot | none | Click a logical container slot. |
container_shift_click_slot | none | Shift-click a logical container slot. |
container_insert_item | action | Insert a requested item into a matching logical slot. |
container_take_slot | none | Take from a logical container slot. |
wait_for_container_slot | action ticks | Wait until a logical slot matches requested criteria. |
Queue & Sequences · 5 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
delay | ticks | Wait a number of game ticks. |
sequence | none | Queue child actions in order. |
enqueue_action | action | Queue another named DAI action/objective by resource ID. |
queue_clear | none | Clear queued runtime actions. |
random_action | sequence | Choose from the supplied child action sequence. |
Crafting · 2 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
craft_recipe | action state | Craft a requested recipe. |
craft_take_result | none | Take the result from the active crafting output. |
Objectives · 1 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
objective_execute | action | Execute another named objective/action definition. |
Flow Control · 4 actions
| Action type | Handler parameters | Purpose |
|---|---|---|
stop_if_failure | none | Stop queued flow when the previous action failed. |
stop_if_success | none | Stop queued flow when the previous action succeeded. |
run_if_failure | none | Run a referenced action when the previous action failed. |
run_if_success | none | Run a referenced action when the previous action succeeded. |
Example: Find a Nearby Log
recognize_block
{
"type": "recognize_block",
"action": "#minecraft:logs",
"value": 24.0
}Example: Compose Actions
Simple sequence
{
"type": "sequence",
"sequence": [
{
"type": "move",
"direction": "forward",
"ticks": 20
},
{
"type": "input_stop_all"
},
{
"type": "delay",
"ticks": 10
}
]
}