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.

ActionPayloadPurpose
overlay_spritespriteAdd or replace a static resource-pack texture layer.
overlay_sprite_sheetsprite_sheetAdd or replace an animated frame-grid layer.
overlay_removeactionRemove one overlay by overlay ID.
overlay_clearnoneClear 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 typeHandler parametersPurpose
pause_menunoneOpen Minecraft's pause menu.
update_menumenu openOpen or update a DAI menu.
open_chatnoneOpen the chat screen.
close_screennoneClose the currently open screen.
Camera & Look · 2 actions
Action typeHandler parametersPurpose
set_lookyaw pitchSet player yaw and pitch.
add_lookyaw pitchAdd yaw/pitch offsets to the current view.
Movement · 9 actions
Action typeHandler parametersPurpose
movedirection ticksMove in a cardinal player-relative direction for a number of ticks.
jumpdirection ticksJump; optionally combine the jump with short directional movement.
crouch_togglenoneToggle crouch/sneak input.
crouch_setstateExplicitly enable or disable crouch.
sprint_togglenoneToggle sprint input.
sprint_setstateExplicitly enable or disable sprint.
swim_togglenoneToggle managed swimming.
swim_setstateExplicitly enable or disable managed swimming.
input_stop_allnoneRelease/reset all DAI-managed movement input.
Targeting & Recognition · 4 actions
Action typeHandler parametersPurpose
scannoneRun the normal target scan.
target_clearnoneClear the current selected DAI target.
recognize_targetnoneRun recognition against the selected target.
recognize_blockaction valueFind a nearby block or block tag and select it as the target.
Combat · 4 actions
Action typeHandler parametersPurpose
attack_targetnoneAttack the current DAI target.
attack_basicnonePerform a basic attack.
attack_startnoneHold attack.
attack_stopnoneRelease attack.
Automation / Compatibility · 7 actions
Action typeHandler parametersPurpose
automation_start_vanilla_gameplay compatibilitynoneAutomation start vanilla gameplay.
automation_start_speedrun compatibilitynoneAutomation start speedrun.
automation_start_creative_builder compatibilitynoneAutomation start creative builder.
automation_start_adventure compatibilitynoneAutomation start adventure.
automation_continuenoneContinue the currently configured automation lifecycle.
speedrun_find_portal_site compatibilityopenSpeedrun find portal site.
automation_stopnoneStop active automation and clear managed runtime work.
Game Mode, Input & Creative · 25 actions
Action typeHandler parametersPurpose
set_gamemodeactionRequest a gamemode change through Minecraft's normal command path.
run_commandactionSubmit a Minecraft command string.
key_clickactionClick a named key once.
key_pressactionPress/hold a named key.
key_releaseactionRelease a named key.
type_textactionType the supplied text through DAI's input layer.
creative_open_inventorynoneOpen the Creative inventory.
creative_close_inventorynoneClose the Creative inventory.
creative_select_tabactionSelect a Creative inventory tab.
creative_search_itemactionEnter a Creative inventory search query.
creative_take_itemaction slotTake a visible Creative item into a hotbar slot.
creative_equip_itemaction slotPut a specified Creative item directly into a hotbar slot.
creative_save_toolbarnoneSave a Creative toolbar preset.
creative_load_toolbarnoneLoad a Creative toolbar preset.
creative_pick_block_nbtnoneCreative pick-block while preserving block data.
creative_remove_blocknoneRemove the selected block through the Creative helper.
creative_place_blocknonePlace the currently selected Creative block.
creative_set_blockactionApply a requested block-state string through the Creative helper.
creative_flight_setstateEnable or disable Creative flight.
creative_fly_toticks valueFly toward the current spatial destination.
wait_for_creative_flightslotWait for the active Creative flight generation to finish.
creative_hoverticksHold position in Creative flight for a number of ticks.
creative_build_blueprintnoneStart the configured Creative blueprint build.
creative_blueprint_cell internalnoneNested blueprint payload type; normally not dispatched directly.
wait_for_creative_buildslotWait for the active Creative build generation to finish.
Inventory & Hotbar · 10 actions
Action typeHandler parametersPurpose
open_inventorynoneOpen the player's inventory.
hotbar_selectslotSelect a hotbar slot.
hotbar_nextnoneSelect the next hotbar slot.
hotbar_previousnoneSelect the previous hotbar slot.
hotbar_normalizenoneNormalize/reorganize the hotbar using DAI's helper.
item_usenonePerform a normal item-use click.
use_startnoneHold item use.
use_stopnoneRelease item use.
item_dropnoneDrop the currently selected item.
item_swapnoneSwap main-hand and off-hand items.
Equipment Selection · 5 actions
Action typeHandler parametersPurpose
hotbar_select_itemactionSelect a matching item in the hotbar.
equip_best_toolactionEquip the best tool, optionally for a requested target.
equip_best_weaponnoneEquip the best available weapon.
equip_best_foodnoneEquip the best available food.
equip_best_blockactionEquip the best matching block.
Interaction · 2 actions
Action typeHandler parametersPurpose
interactnonePerform a normal interaction with the current crosshair target.
pick_blocknonePerform Minecraft's pick-block input.
Mining & Item Collection · 8 actions
Action typeHandler parametersPurpose
break_targeted_oncenoneCompatibility alias for one targeted break attempt.
break_oncenonePerform one targeted break attempt.
break_startnoneHold block-breaking input.
break_stopnoneRelease block-breaking input.
equip_best_tool_for_blocknoneEquip the best tool for the selected block.
mine_targeted_blocknoneMine the currently selected DAI block target.
mine_nearest_blockaction ticks valueFind and mine a nearby matching block.
collect_nearby_itemsaction ticks valueNavigate toward and collect nearby matching item entities.
Block Placement & Harvesting · 8 actions
Action typeHandler parametersPurpose
placenonePerform one normal placement/use action.
place_targeted_blocknonePlace against the selected DAI target.
place_nearest_blockticks valueFind a nearby placement opportunity and place a block.
place_block_at_selected_positionaction ticksPhysically place a requested block at the selected exact position.
exact_place_align internalnoneInternal smooth-look stage used by exact Creative placement.
exact_place_finish internalnoneInternal continuation stage used by exact placement.
exact_place_verify internalnoneInternal world-state verification stage used by exact placement.
harvest_cropticksHarvest the selected crop target.
Navigation & Exploration · 9 actions
Action typeHandler parametersPurpose
approach_target_blockticks valueNavigate to a reachable interaction position near the selected block.
wait_for_approachslotBarrier/wait action paired with approach_target_block.
wait_for_target_blocknoneWait until the selected block is aligned/reachable for interaction.
explore_for_blockaction ticks valueExplore until a matching block or block tag is discovered.
wait_for_explorationslotBarrier/wait action paired with explore_for_block.
vertical_scaffold_to_targetticks valueBuild/ascend a vertical scaffold toward the target.
wait_for_vertical_scaffoldnoneWait for scaffold ascent to finish.
vertical_scaffold_descendticksDescend the current vertical scaffold.
wait_for_scaffold_descentnoneWait for scaffold descent to finish.
Waypoints · 5 actions
Action typeHandler parametersPurpose
remember_waypointactionSave the player's current position under a waypoint name.
remember_target_waypointactionSave the current selected block as a waypoint.
select_waypointactionSelect a named waypoint as the current target.
forget_waypointactionDelete a named waypoint.
forget_failed_waypointactionRemove a waypoint from failed-waypoint memory.
Spatial / Adjacency · 6 actions
Action typeHandler parametersPurpose
select_waypoint_offsetaction directionSelect a block at waypoint + offset.
remember_offset_waypointaction open directionCreate a waypoint at base waypoint + offset.
remember_surface_offset_waypointaction open directionCreate an offset waypoint normalized to the nearby walkable surface.
scan_adjacent_blocksaction directionScan blocks around a target/player/waypoint into spatial state.
select_adjacent_blockaction directionSelect one adjacent block/offset from a spatial origin.
spatial_clearnoneClear temporary spatial scan state.
Food · 1 actions
Action typeHandler parametersPurpose
eat_best_foodticksSelect/use the best available food until eating completes.
Containers & Screen Profiles · 9 actions
Action typeHandler parametersPurpose
open_containerticksInteract with the selected target to open a container.
wait_for_containerticksWait for a container screen to open.
wait_for_screen_profileaction ticksWait for a named DAI screen profile.
close_containernoneClose the current container screen.
container_click_slotnoneClick a logical container slot.
container_shift_click_slotnoneShift-click a logical container slot.
container_insert_itemactionInsert a requested item into a matching logical slot.
container_take_slotnoneTake from a logical container slot.
wait_for_container_slotaction ticksWait until a logical slot matches requested criteria.
Queue & Sequences · 5 actions
Action typeHandler parametersPurpose
delayticksWait a number of game ticks.
sequencenoneQueue child actions in order.
enqueue_actionactionQueue another named DAI action/objective by resource ID.
queue_clearnoneClear queued runtime actions.
random_actionsequenceChoose from the supplied child action sequence.
Crafting · 2 actions
Action typeHandler parametersPurpose
craft_recipeaction stateCraft a requested recipe.
craft_take_resultnoneTake the result from the active crafting output.
Objectives · 1 actions
Action typeHandler parametersPurpose
objective_executeactionExecute another named objective/action definition.
Flow Control · 4 actions
Action typeHandler parametersPurpose
stop_if_failurenoneStop queued flow when the previous action failed.
stop_if_successnoneStop queued flow when the previous action succeeded.
run_if_failurenoneRun a referenced action when the previous action failed.
run_if_successnoneRun 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
    }
  ]
}