-
Bug
-
Resolution: Fixed
-
Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w36a, Minecraft 13w36b, Minecraft 13w37a, Minecraft 13w39a, Minecraft 13w39b, Minecraft 13w41b
-
Confirmed
When you leave or enter the nether in multiplayer you don't appear at the right location for other clients.
This video shows the bug: http://youtu.be/c1zM8gFB3ro
Here is why this happens: When a player goes through a portal his x- and z-coordinate get multiplied/divided by 8. Then the entity gets spawned in to other dimension.
And after that the player gets moved into the portal where he should spawn. But the last repositioning isn't send to the other clients. Therefor they see the player at x*8, y, z*8 or x/8, y, z/8 (depending if the player left or entered the nether).
To fix this bug we either need to send the absolute coordinates to the other clients after the repositioning or to place the player in the portal before it gets spawned into the world.
Here is how I programmed the second fix with MCP:
In ServerConfigurationManager.java I changed line 507 to 510 from
par4WorldServer.spawnEntityInWorld(par1Entity); //Spawns the entity par1Entity.setLocationAndAngles(var5, par1Entity.posY, var7, par1Entity.rotationYaw, par1Entity.rotationPitch); //Sets the position to x*8, y, z*8 or x/8, y, z/8. The values were calculated earlier par4WorldServer.updateEntityWithOptionalForce(par1Entity, false); par4WorldServer.getDefaultTeleporter().placeInPortal(par1Entity, var11, var13, var15, var17); //Repositions the entity into the portal //The comments where added by me
to
par1Entity.setLocationAndAngles(var5, par1Entity.posY, var7, par1Entity.rotationYaw, par1Entity.rotationPitch); //Sets the position to x*8, y, z*8 or x/8, y, z/8. The values were calculated earlier par4WorldServer.getDefaultTeleporter().placeInPortal(par1Entity, var11, var13, var15, var17); //Repositions the entity into the portal par4WorldServer.spawnEntityInWorld(par1Entity); //Spawns the entity par4WorldServer.updateEntityWithOptionalForce(par1Entity, false);
The screenshot is showing a player who came through the portal breaking a block. You can see him in the background due to the offset.
FOR MODERATORS:
Since the other two posts on this bug miss out on a lot of important information I decided to repost it. If you mark this bug as duplicate please make sure to make the information visible in the other posts. Thank you!
This issues was posted two times before:
https://mojang.atlassian.net/browse/MC-12608
https://mojang.atlassian.net/browse/MC-17345
- is duplicated by
-
MC-12608 Players fly, get invisible, duplicate, when coming trough a portal
- Resolved
-
MC-17345 Nether multiplayer lan issue
- Resolved
-
MC-30471 nether bug
- Resolved
-
MC-35036 my brother and i were in a LAN server. he went in a nether portal and then appeared in the over-world >10 blocks of the ground still in survival, and could walk around, but on his screen he was still in the nether. i have reproduced this 3 times.
- Resolved