#I want my JSON UI to be shown after using some item.

1 messages · Page 1 of 1 (latest)

bronze valleyBOT
#
Thanks for asking your question!

Once you have finished, please close your thread.

violet pumice
#

Common ways to open it are by using an npc/script menu or the title command

spring plank
#

Just do the GUI with your conditional bind and it will show your GUI or if your Json UI for server_form is not a conditional GUI just show it

glacial adder
#
{
  "namespace": "my_ui",
  "test_element": {
    "type": "label",
    "text": "Hello World"
  },
  "bindings": [
    {
      "binding_condition": "always"
    }
  ]
}

Like this?

spring plank
#

Damn man, i know Zero abou json ui

violet pumice
# glacial adder How?

Title command is done by editing the hud_screen.json file but I cant remember the other file names

glacial adder
#

Wait

#
const my_ui = new ActionFormData()
  .title("My UI")
  .button("Button 1")
  .button("Button 2")
  .button("Button 3");

world.events.itemUse.subscribe((event) => {
  if (event.item.typeId === "minecraft:stick") {
    my_ui.show(event.source);
  }
});

Some guy on yt said that json ui is binded to title, how can I nind this?