Player is for a short moment at the wrong position when opening a world
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.
Linked Issues
Created Issue:
Zoom animation when entering new generated world
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
When it is not working change the view distance before creating the world to for example 2
Zoom animation when entering (new generated) world
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
When it is not working change the view distance before creating the world to for example 2
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
When it is not working change the view distance before creating the world to for example 2
Maybe fixed for Minecraft 1.8-pre 2
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Wait some time, that the game can completely load everything around
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
When it is not working change the view distance before creating the world to for example 2
relates to
Zoom animation when entering (new generated)worldPlayer is for a short moment at the wrong position when opening a world
View distance: 8
- Create a new world and minimize Minecraft while the game is generating the new world
- Wait some time, that the game can completely load everything around
- Press ESC or "Back to Game"
You will see that this causes a strange "zoom" animation
When it is not working change the view distance before creating the world to for example 2
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 finished 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.
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 finishe
dloading (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.
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.
Cannot reproduce in 15w37a as Minecraft does not load chunks anymore when minimizing while it opens a worldI don't seem to be able to reproduce this in 20w07a.
Can someone please check, if this still applies to 1.15.2 or the latest 1.16 development snapshot (currently that is 20w07a)?
Can reproduce in 1.11.2, but can no longer in 20w07a. Appears to have been fixed or behaviour has changed in general.