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, 1.16 Release Candidate 1, 1.16, 1.16.4, 20w51a
Fix Version/s: None
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.
- (Not in a bed) Open the chat and type three different messages, for example
- Start sleeping in a bed
- Use the UP arrow key to select the message "2" and send the message
- Use the UP arrow key again
→ The message that appears is "1" (the first message) instead of "3" if
MC-4065is not fixed or "2" (the last message) if MC-4065is fixed
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.