Bed chat GUI not resetting sent messages history index after sending a message
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
- (Not in a bed) Open the chat and type three different messages, for example
1
2
3
- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is 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.
Created Issue:
Bed chat GUI not resetting sent messages history index after sending a message
The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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 this bug is not visible because every time you open the chat the GUI is recreated and the value of this field is "initialized" to this value.
The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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 the chat the GUI is recreated and the value of this field is "initialized" to this value.
The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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
the chatthe GUI is recreated and the value of this field is "initialized" to this value.The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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 this value.
The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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 th
is value.The bug
Wheen 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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.
relates to
The bug
Whe
en 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
- (Not in a bed) Open the chat and type three different messages, for example
123- 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" ifMC-4065is not fixed or "2" (the last message) ifMC-4065is fixedThe 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.
is duplicated by
Good catch!
It is now MC-105303. I hope the title fits well ![]()
And sorry for stealing you the chance for a code analysis ![]()
But we should not fight about that. I hope the one provided is correct
Thank you for your report!
We're tracking this issue in MC-105303, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
– I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit
Maybe this and
MC-4065can be generalized to "Bed chat GUI not updating sent chat history"?They are two different issues.
MC-4065only affects the bed chat GUI whereas this one affects the chat gui (and all its subclasses).Can confirm for 1.11
Still present in 1.13.1
affects 1.16 candidate 1
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.