mojira.dev
MC-297825

Entering a dialog does not preserve the full state of an already-open block UI (anvil, operator utility blocks)

When the player receives a dialog while in an anvil UI (or, in non-singleplayer, a command block, test block, structure block or jigsaw block UI), parts of the state of said UI will have been lost when the player returns from the dialog. In particular:

  • An anvil’s text field will be blank

  • A command block’s command field will be blank (also applies to minecart with command block)

  • The text fields of test, structure and jigsaw blocks will revert to whatever text they had when the UI was entered initially (but the state of any buttons in said blocks is preserved)

  • The “levels” slider in the jigsaw block UI is preserved, but the slider itself is incorrectly reset to its default position

It would be expected the client would store the UI’s present state upon receiving a new dialog, then repopulate the field(s) when the dialog is exited.

To reproduce

  1. Place an impulse command block with the command dialog show @p minecraft:custom_options

  2. Connect it to a pressure plate with several (6-8) 4-tick redstone repeaters

  3. Place an anvil down near the pressure plate, and ensure that you have an item somewhere in your inventory

  4. Step on the pressure plate, then quickly enter the anvil GUI and shift-click the item into the input slot

  5. When the dialog appears, press Back or the escape key- it does not matter
    ❌ Observe that the text field, which formerly displayed the name of the item, is now blank

Linked issues

Attachments

Comments 0

No comments.

clamlol

(Unassigned)

Confirmed

Platform

Normal

Commands, UI

25w20a, 25w21a, 1.21.6 Pre-Release 1

Retrieved