[MC-4065] Messages/commands sent while in a bed won't be remembered in sent history Created: 02/Dec/12  Updated: 04/Jun/21  Resolved: 26/May/20

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.5, Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 1.7.5, Minecraft 1.7.9, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b, Minecraft 1.7.10, Minecraft 14w33c, Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d, Minecraft 1.8-pre1, Minecraft 1.8, Minecraft 15w34a, Minecraft 15w50a, Minecraft 1.9 Pre-Release 1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w35a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w18b, Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 3, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w21a, Minecraft 1.13-pre1, Minecraft 1.13, Minecraft 1.13.1, Minecraft 1.14 Pre-Release 1, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 1, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, Minecraft 1.14.4 Pre-Release 5, Minecraft 1.14.4 Pre-Release 6, 1.14.4, 19w34a, 19w35a, 19w36a, 19w37a, 19w38b, 19w39a, 19w40a, 19w41a, 19w42a, 19w45b, 19w46b, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w13a, 20w13b, 20w15a, 20w17a, 20w18a, 20w19a, 20w20a, 20w20b, 20w21a
Fix Version/s: 20w22a

Type: Bug
Reporter: Ryan S Assignee: Unassigned
Resolution: Fixed Votes: 32
Labels: bed, chat, chat-history

Attachments: File Messages and commands sent while in a bed won't be remembered in sent history.mp4    
Issue Links:
Duplicate
is duplicated by MC-18945 If you type something while in bed, t... Resolved
is duplicated by MC-27386 Messages sent while in a bed won't be... Resolved
is duplicated by MC-43667 Chat history in beds Resolved
is duplicated by MC-50080 Chatting In Beds Don't Save History Resolved
is duplicated by MC-53031 typing while sleeping wil not remembe... Resolved
is duplicated by MC-76023 Chat history fails when message is sa... Resolved
is duplicated by MC-112615 Up arrow to bring last command won't ... Resolved
is duplicated by MC-130188 Sleep Resolved
Relates
relates to MC-105303 Bed chat GUI not resetting sent messa... Open
relates to MC-127573 Hover text is displayed for multiplay... Resolved
relates to MC-160710 Chat messages written while sleeping ... Resolved
CHK:
Confirmation Status: Confirmed
Category:
Commands

 Description   

The bug

When in a bed, typing and submitting a message and/or command will be forgotten if you try to access that with the arrow keys while out of bed.

Code analysis

Code analysis by marcono1234 can be found in this comment.



 Comments   
Comment by [Mod] Greymagic27 [ 12/Mar/20 ]

1.15.2 is already in the affected versions list, please make sure you check there before confirming.

Comment by [Helper] ZeNico13 [ 17/May/19 ]

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2

Comment by [Helper] ZeNico13 [ 13/May/19 ]

Still in 1.14.1 Release

Comment by [Helper] ZeNico13 [ 23/Apr/19 ]

Still in 1.14 Release

Comment by [Helper] ZeNico13 [ 19/Apr/19 ]

Still in 1.14 pre-3, 1.14 pre-4 and 1.14 pre-5

Comment by [Helper] ZeNico13 [ 12/Apr/19 ]

Still in 1.14 Pre-Release 2

Comment by [Helper] ZeNico13 [ 12/Apr/19 ]

Confirmed for all Minecraft 1.14 snapshots, especially in 19w14a, 19w14b and 1.14 Pre-Release 1

Messages and commands sent while in a bed won't be remembered in sent history.mp4

Comment by Kraif [ 29/Aug/18 ]

Confirmed for 1.13.1.

Comment by user-2a4c8 (Inactive) [ 26/Jul/18 ]

Confirmed 1.13

Comment by [Mod] tryashtar [ 19/Nov/16 ]

Still here up through 1.11, by the way.

Comment by Marcono1234 [ 13/Jul/16 ]

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

Comment by null (Inactive) [ 13/Jul/16 ]

I can definitely confirm for 1.10.2. I've also noticed a second (related) bug:

Send the messages "#1", "#2", and "#3" in that order. Hop onto a bed and press the up arrow key twice, then Enter, to resend the "#2" message. Now, when you press the up arrow key again, "#1" will be displayed instead of "#3".

Can anyone summarize the above in one sentence?

Comment by Immaterialise [ 17/Feb/16 ]

Confirmed for 1.9-pre1

Comment by Marcono1234 [ 12/Dec/15 ]

Confirmed for

  • 15w50a

The reason for that is that currently the method keyTyped(char typedChar, int keyCode) in the class /Client/src/net/minecraft/client/gui/GuiSleepMP.java (MCP 1.8 names) calls this.mc.thePlayer.sendChatMessage(var3); which directly sends the message to the server, however it should call instead the method func_175275_f(String p_175275_1_).

/**
 * Fired when a key is typed (except F11 who toggle full screen). This is the equivalent of
 * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
 */
protected void keyTyped(char typedChar, int keyCode) throws IOException
{
	if (keyCode == 1)
	{
		this.wakeFromSleep();
	}
	else if (keyCode != 28 && keyCode != 156)
	{
		super.keyTyped(typedChar, keyCode);
	}
	else
	{
		String var3 = this.inputField.getText().trim();

		if (!var3.isEmpty())
		{
			// Changed this
			this.func_175275_f(var3);
			//this.mc.thePlayer.sendChatMessage(var3);
		}

		this.inputField.setText("");
		this.mc.ingameGUI.getChatGUI().resetScroll();
	}
}

Note: For Minecraft 1.10 decompiled using MCP 9.30 the method that should be called is net.minecraft.client.gui.GuiScreen.sendChatMessage(String).

Comment by ZuzuTyp [ 19/Aug/15 ]

confirmed for 15w34a

Comment by C_moneySmith [ 08/Nov/14 ]

confirmed for 1.8 official release

Comment by Eric [ 24/Aug/14 ]

Confirmed for 1.8pre1 and before. This is a little annoying, but not game breaking, but I think the fix shouldn't take much.

Comment by Marcono1234 [ 01/Jun/14 ]

Confirmed for 14w21b

Comment by [Mod] Ezekiel (ezfe) [ 24/Feb/14 ]

Is this still a concern in the latest Minecraft version 14w08a? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Lucas Jed [ 07/Aug/13 ]

I'll just say I can also confirm this!

Comment by Tails [ 16/Mar/13 ]

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by [Mod] CubeTheThird [ 15/Dec/12 ]

Can confirm.

Generated at Sun Jan 12 12:03:20 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.