Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-105303

Bed chat GUI not resetting sent messages history index after sending a message

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.10.2, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      When you lay in a bed, select a previously sent chat message, send this message and use the up or down arrow key again to select a previously sent chat message again, you will not see the last sent message first but instead the ones where you stopped moving in the history before.

      How to reproduce

      1. (Not in a bed) Open the chat and type three different messages, for example
        1
        
        2
        
        3
        
      2. Start sleeping in a bed
      3. Use the UP arrow key to select the message "2" and send the message
      4. Use the UP arrow key again
        → The message that appears is "1" (the first message) instead of "3" if MC-4065 is not fixed or "2" (the last message) if MC-4065 is fixed

      The reason

      The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

      The reason for this is that the method net.minecraft.client.gui.GuiScreen.sendChatMessage(String) is not resetting the value of the sentHistoryCursor field, which stores the current index of the chat messages history the player last looked at. This method should set the value of the field to the size of the sent chat messages history list. For the normal chat GUI this bug is not visible because every time you open it, the GUI is recreated and the value of this field is "initialized" to the size of the message history list.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: