mojira.dev
MC-114872

Title actionbar doesn't reset/clear

The bug

When you use the command /title @a reset or /title @a clear and you have a title in the actionbar slot, it does not reset/clear it.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 3

I assume that this is intended. The actionbar is rather unrelated to titles. Times will not affect it and it is shown regardless of whether or not a title is currently visible (which is not the case for subtitles).
You can easily clear the actionbar by displaying an empty string:

/title @a actionbar [""]

This issue still exists in Minecraft snapshot 23w07a.

Code analysis (Yarn mappings)

The InGameHud#clearTitle and InGameHud#setDefaultTitleFade methods are responsible for the client portion of clearing/resetting functionality.

The former method clears the InGameHud#title, InGameHud#subtitle, and InGameHud#titleRemainTicks fields, but not the corresponding InGameHud#overlayMessage and InGameHud#overlayRemaining fields used for action bar/overlay messages.

Since there are no fields for overlay timing (MC-106167), they are not reset by the latter method. The existing timing fields that are reset are not used for overlay timing.

The recommended fix would be to clear the InGameHud#overlayMessage and InGameHud#overlayRemaining fields in the former method. Timings would require the recommended fix for MC-106167.

This issue still exists in Minecraft 1.19.4 release candidate 3.

Josh I

(Unassigned)

Confirmed

Commands

Minecraft 1.11.2, Minecraft 1.12.2, Minecraft 18w03b, 1.14.4, 19w37a, ..., 23w07a, 1.19.4 Release Candidate 3, 1.19.4, 1.21.3, 24w45a

Retrieved