The bug
When another player is newly rendered on a server (e.g. joining in the server, getting in your render distance (MC-130411), or respawning (MC-237037)), they will look south until they move their head. This can look pretty strange if the body of the player is facing, for example, north.
Steps to Reproduce
Get two players and label them, "Player A" and "Player B".
Let player A enter.
Let player B enter.
Let player A face north.
Let player B move far away (beyond render distance) and back.
Observed Behavior
"Player B" sees "Player A" now facing south when actually "Player A" is still facing north, therefore indicating that when newly rendered by the client, all players appear to be facing south until they adjust their head rotation.
Expected Behavior
The expected behavior would be that when players get rendered, all players would appear to be facing the correct direction.
Code Analysis
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
It looks like the method net.minecraft.entity.Entity.setPositionAndRotation(double, double, double, float, float)
which is called when a player is spawned client-side only sets the body rotation. This could be fixed as well by sending a net.minecraft.network.play.server.SPacketEntityHeadLook.SPacketEntityHeadLook(Entity, byte)
packet after the spawn packet.
Linked issues
is duplicated by 6
relates to 2
Attachments
Comments 13
This bug still exists in Minecraft 1.11.2, 1.12.1.
Here is a GIF of the phenomenon, which I created using two accounts on a local vanilla server in 1.12.1. (It was too large to upload here.)
Then just some other information. 🙂
If the player walks around without moving their head, it remains pointing south. (expected behavior)
If the player changes only the pitch of their head, it remains pointing south, though the pitch will change. (unexpected, as both yaw and pitch are sent in the entity look packet)
If the player changes the yaw of their head, it corrects to where it should be. (expected behavior)
Might relate to MC-11141, but very likely only because of the topic, not the code