Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-109346

Newly rendered players always look south until they move their head

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.2 Pre-release 2
    • Minecraft 1.10.2, Minecraft 16w42a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w21b, Minecraft 18w22a, Minecraft 18w22b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre7, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2, Minecraft 18w45a, Minecraft 18w46a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w12b, Minecraft 19w13a, 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.2, Minecraft 1.14.3 Pre-Release 2, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 3, Minecraft 1.14.4 Pre-Release 4, 1.15.2, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w18a, 20w19a, 1.16 Pre-release 3, 20w46a, 21w10a, 21w11a, 21w13a, 21w15a, 21w17a, 21w18a, 1.17, 1.17.1, 21w37a, 21w40a, 1.18 Pre-release 1, 1.18, 1.18.1, 22w05a, 1.18.2, 22w13a, 22w18a, 22w19a, 1.19 Pre-release 2, 1.19 Pre-release 3, 1.19 Pre-release 4, 1.19 Pre-release 5, 1.19, 1.19.1, 1.19.2, 1.19.3 Pre-release 2, 1.19.3, 23w03a, 23w04a, 1.19.4, 1.20 Pre-release 1, 1.20.1, 23w33a
    • Confirmed
    • Networking, Player
    • Low

      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.

        1. MC-109346 - Analysis.png
          MC-109346 - Analysis.png
          478 kB
        2. MC-109346.mp4
          7.89 MB
        3. demo.mp4
          5.13 MB

            gegy1000 [Mojang] Gegy
            DiamondDragon721 Orbic
            Votes:
            20 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: