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

Player is for a short moment at the wrong position when opening a world

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 14w26b, Minecraft 14w28a, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre2, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a
    • Fix Version/s: Minecraft 15w37a
    • Confirmation Status:
      Confirmed

      Description

      The bug

      When you open a world the player is at the wrong position for a short moment. This is most noticeable when the game loses focus and pauses just before it finishes loading (might take multiple tries).

      Code analysis

      Based on 1.11 decompiled using MCP 9.35 rc1

      This happens because the client calls the method net.minecraft.client.Minecraft.loadWorld(WorldClient, String) when it receives a net.minecraft.network.play.server.SPacketJoinGame packet. The constructor net.minecraft.entity.player.EntityPlayer.EntityPlayer(World, GameProfile) places the player at the spawn point and the method net.minecraft.entity.player.EntityPlayer.preparePlayerToSpawn() searches a valid position near the spawn point.
      The position is corrected when the first net.minecraft.network.play.server.SPacketPlayerPosLook packet is received.

      Sending the player position in the SPacketJoinGame packet could solve this problem.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Helper] Marcono1234
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: