DAI_SCREENS

Data Screens

Build a complete client UI from datapack JSON and return cleanly to gameplay.

DAI 4.1JSON-firstTest in Minecraft

Build path

  1. Create the screenAdd dai_screens/status.json.
  2. Add widgetsStart with label/button, then state-driven progress/input controls.
  3. Open itUse open_data_screen with the screen ID in action.
  4. Close cleanlyUse close_screen or explicit cursor recapture.
  5. Test EscapeVerify close_on_escape and pause_game.

Starter JSON

{
  "title":"Status",
  "width":320,
  "height":220,
  "close_on_escape":true,
  "pause_game":false,
  "widgets":[{"type":"button","id":"resume","x":16,"y":176,"width":120,"height":20,"label":"RESUME","action":"my_pack:resume"}]
}

4.1 presentation ownership

Data screens no longer have to use the default DAI panel, border or title. The style object controls those fallback elements and whether the background scene fills the screen.

{
  "title":"Status",
  "width":320,
  "height":220,
  "background_scene":"my_pack:status_scene",
  "close_on_escape":true,
  "pause_game":false,
  "style":{
    "draw_panel":false,
    "draw_border":false,
    "draw_title":false,
    "scene_fullscreen":true
  },
  "widgets":[]
}

Generic presentation actions now include open_screen_class, open_shell_stage, and reload_presentation, so JSON-defined UIs can navigate the shell without depending on a hardcoded DAI menu.

Next

Pair with the legacy 3.3 input/UI reference.