mojira.dev
MC-108974

"Your home bed was missing or obstructed" message uses chat, not action bar

Unlike most other bed-based chat messages, such as those informing you of monsters or sleeping at the incorrect time, the text that appears when your spawn point is missing is sent to the chat. It should be sent to the action bar.


Fix: (Based off of Minecraft 1.11, MCP 9.35)

net.minecraft.client.network.NetHandlerPlayClient.handleChangeGameState(SPacketChangeGameState packetIn)

public void handleChangeGameState(SPacketChangeGameState packetIn)
    {
        if (i >= 0 && i < SPacketChangeGameState.MESSAGE_NAMES.length && SPacketChangeGameState.MESSAGE_NAMES[i] != null)
        {
        	//was previously set to false (true is for actionbar)
                entityplayer.addChatComponentMessage(new TextComponentTranslation(SPacketChangeGameState.MESSAGE_NAMES[i], new Object[0]), true);
        }
    }

Linked issues

Comments 0

No comments.

tryashtar

migrated

Confirmed

Minecraft 16w42a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11

Retrieved