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



    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 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, 1.16 Release Candidate 1, 1.16, 1.16.4, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a
    • None
    • Confirmed
    • Text, UI


      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
      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.


        Issue Links



              Unassigned Unassigned
              marcono1234 [Mod] Marcono1234
              7 Vote for this issue
              4 Start watching this issue