mojira.dev
MC-298472

Dialogs can't sometimes have "after_action" field set to "none"

I have a Dialog with “after_action” set to “none” and it works, but I have another Dialog with this value but it not works.

The Dialog with “after_action” set to “none” that works (execute this command in a Command Block) :

dialog show @p { "type": "minecraft:multi_action", "title": { "text": "Happy Ghast", "type": "text", "extra": [ { "text": " Order Menu", "color": "white", "bold": false } ], "color": "#dadada", "bold": true }, "body": { "type": "minecraft:plain_message", "contents": { "text": "Make sure you selected a Happy Ghast if you want to give it orders", "color": "gray" } }, "pause": false, "after_action": "none", "exit_action": { "label": { "text": "Close", "bold": true }, "width": 50 }, "actions": [ { "label": { "text": "Select", "color": "#9e9e9e", "bold": true }, "tooltip": "Select the nearest Happy Ghast in a distance of 100 blocks to give it orders", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 2" } }, { "label": { "text": "See selected", "color": "#9e9e9e", "bold": true }, "tooltip": "Show which Happy Ghast is selected", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 3" } }, { "label": { "text": "Stop", "color": "#d12d2d", "bold": true }, "tooltip": "Prevent the Happy Ghast to move when it is not controlled", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 4" } }, { "label": { "text": "Move", "color": "#0e7ade", "bold": true }, "tooltip": "Allow the Happy Ghast to move again when it is not controlled", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 5" } }, { "label": { "text": "Follow", "color": "#e4af1b", "bold": true }, "tooltip": "Make the Happy Ghast to follow you in a distance of 100 blocks §o(unless if it is stopped)", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 6" } }, { "label": { "text": "Stop Follow", "color": "#e46b1b", "bold": true }, "tooltip": "Stop making the Happy Ghast to following you", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 7" } }, { "label": { "text": "Lock", "color": "#a63939", "bold": true }, "tooltip": "Forbid other entities to ride the Happy Ghast", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 8" } }, { "label": { "text": "Unlock", "color": "#39a639", "bold": true }, "tooltip": "Authorize the other entities to ride the Happy Ghast", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 9" } }, { "label": { "text": "Mount", "color": "#d2a470", "bold": true }, "tooltip": "Make mount the nearest passive mob of the Happy Ghast in a distance of 6.5 blocks of it §o(even if the Happy Ghast is locked, the mob will did'nt be dismounted automatically)", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 10" } }, { "label": { "text": "Dismount", "color": "#b78383", "bold": true }, "tooltip": "Make the other entities/another entity dismounted that are riding the Happy Ghast", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 11" } }, { "label": { "text": "Leash", "color": "#c38a2e", "bold": true }, "tooltip": "Leash the nearest leashable entity of the bottom of the Happy Ghast if you are in a distance of 6.5 blocks of the Happy Ghast and if you have a Lead in your inventory", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 12" } }, { "label": { "text": "Unleash", "color": "#c3672e", "bold": true }, "tooltip": "Unleash the furthest leashed entity from the Happy Ghast if you are in a distance of 6.5 blocks of the Happy Ghast, and it will regives you the Lead", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 13" } }, { "label": { "text": "Teleport", "color": "#9500ff", "bold": true }, "tooltip": "Teleport the Happy Ghast that is at most in a distance of 50 blocks of you to you", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 14" } }, { "label": { "text": "Place Placeable Area", "color": "#34678e", "bold": true }, "tooltip": "Place Structure Voids around that allows you to replace them by another blocks in the sky/void without another blocks around you at the top of the Happy Ghast that is at most in a distance of 8 blocks of you if it have mobs or player on it", "action": { "type": "minecraft:run_command", "command": "/trigger happy_ghast set 15" } } ] }

Steps to reproduce :

  • Place an Impulse Command Block

  • Put this command in the Command Block (and you see the text in red) :

dialog show @p { "type": "minecraft:multi_action", "title": [ { "text": "Better ", "color": "gold", "bold": true }, { "text": "Happy Ghast ", "extra": [ { "text": "- ", "color": "dark_gray", "bold": false } ], "color": "gray", "bold": true }, { "text": "Player Configs", "color": "yellow", "bold": false }, { "text": " | Happy Ghast mob settings", "color": "#848484", "bold": false } ], "after_action": "none", "exit_action": { "label": { "text": "Done", "bold": true }, "width": 50 }, "columns": 2, "actions": [ { "label": [ { "text": "Send message : ", "type": "text", "color": "#cfcfcf", "bold": false }, { "text": "Enable ", "color": "green", "bold": true } ], "tooltip": "Default : Enabled\n\nSending message when selected Happy Ghast Order Menu option", "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 2" } }, { "label": { "text": "Disable", "color": "red", "bold": true }, "tooltip": "Default : Enabled\n\nSending message when selected Happy Ghast Order Menu option", "width": 60, "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 3" } }, { "label": [ { "text": "Play sound : ", "type": "text", "color": "#cfcfcf", "bold": false }, { "text": "Enable ", "color": "green", "bold": true } ], "tooltip": "Default : Enabled\n\nPlaying sound when selected Happy Ghast Order Menu option", "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 4" } }, { "label": { "text": "Disable", "color": "red", "bold": true }, "tooltip": "Default : Enabled\n\nPlaying sound when selected Happy Ghast Order Menu option", "width": 60, "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 5" } } ] }
  • Put this command in the Command Block instead (and you see it works, I just removed the “after_action”: “none“ from the JSON) :

dialog show @p { "type": "minecraft:multi_action", "title": [ { "text": "Better ", "color": "gold", "bold": true }, { "text": "Happy Ghast ", "extra": [ { "text": "- ", "color": "dark_gray", "bold": false } ], "color": "gray", "bold": true }, { "text": "Player Configs", "color": "yellow", "bold": false }, { "text": " | Happy Ghast mob settings", "color": "#848484", "bold": false } ], "exit_action": { "label": { "text": "Done", "bold": true }, "width": 50 }, "columns": 2, "actions": [ { "label": [ { "text": "Send message : ", "type": "text", "color": "#cfcfcf", "bold": false }, { "text": "Enable ", "color": "green", "bold": true } ], "tooltip": "Default : Enabled\n\nSending message when selected Happy Ghast Order Menu option", "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 2" } }, { "label": { "text": "Disable", "color": "red", "bold": true }, "tooltip": "Default : Enabled\n\nSending message when selected Happy Ghast Order Menu option", "width": 60, "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 3" } }, { "label": [ { "text": "Play sound : ", "type": "text", "color": "#cfcfcf", "bold": false }, { "text": "Enable ", "color": "green", "bold": true } ], "tooltip": "Default : Enabled\n\nPlaying sound when selected Happy Ghast Order Menu option", "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 4" } }, { "label": { "text": "Disable", "color": "red", "bold": true }, "tooltip": "Default : Enabled\n\nPlaying sound when selected Happy Ghast Order Menu option", "width": 60, "action": { "type": "minecraft:run_command", "command": "trigger better_happy_ghast.player_configs set 5" } } ] }

Observed result :

The first command is written in red and don’t works, and the second command works.

Expected result :

The first command works and you can click on buttons and the dialog isn’t closed, and the second command works too and when you click on a button, it close the dialog.

Environment

Windows 10
Java Edition

Comments 7

From the 1.21.6 Pre-Release changelog:

after_action - an additional operation performed on the dialog after click or submit actions, default: close

  • close - closes the dialog and returns to the previous non-dialog screen (if any)

  • none - does nothing, i.e. keeps the current dialog screen open

    • only available if pause is false to avoid locking the game in single-player mode

But it should be allowed to pause the game and not close the dialog in thz same time, wjen we click on a button, it should de pause the game and re pause the game to fon't have problem maybe

the dialog can unpause and re pause the game when pause is true and after_action to none

Anyway, that makes this a feature request.

So I put it in Miencraft Feedback ?

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

but it’s not logic

Loupieur

(Unassigned)

Plausible

(Unassigned)

1.21.6 Pre-Release 1

Retrieved