fix pointer lock in chrome via funny packet manipulation

This commit is contained in:
ayunami2000 2022-08-25 23:12:18 -04:00
parent 1524d46f26
commit 9ace29d7b0
2 changed files with 3 additions and 3 deletions

View File

@ -307,11 +307,11 @@ public class ServerConfigurationManager {
// footnotes of packet Respawn (0x09)
par1EntityPlayerMP.playerNetServerHandler.sendPacket(new Packet9Respawn(((par1EntityPlayerMP.dimension + 2) % 3) - 1,
(byte) par1EntityPlayerMP.worldObj.difficultySetting, par1EntityPlayerMP.worldObj.getWorldInfo().getTerrainType(),
par1EntityPlayerMP.worldObj.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType()));
69, par1EntityPlayerMP.theItemInWorldManager.getGameType()));
par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(posX, posY, posZ, rotationYaw, rotationPitch);
par1EntityPlayerMP.playerNetServerHandler.sendPacket(new Packet9Respawn(par1EntityPlayerMP.dimension,
(byte) par1EntityPlayerMP.worldObj.difficultySetting, par1EntityPlayerMP.worldObj.getWorldInfo().getTerrainType(),
par1EntityPlayerMP.worldObj.getHeight(), par1EntityPlayerMP.theItemInWorldManager.getGameType()));
69, par1EntityPlayerMP.theItemInWorldManager.getGameType()));
par1EntityPlayerMP.playerNetServerHandler.setPlayerLocation(posX, posY, posZ, rotationYaw, rotationPitch);
this.updateTimeAndWeatherForPlayer(par1EntityPlayerMP, var8);

View File

@ -725,7 +725,7 @@ public class NetClientHandler extends NetHandler {
this.worldClient.isRemote = true;
this.mc.loadWorld(this.worldClient);
this.mc.thePlayer.dimension = par1Packet9Respawn.respawnDimension;
this.mc.displayGuiScreen(new GuiDownloadTerrain(this));
if (par1Packet9Respawn.worldHeight != 69) this.mc.displayGuiScreen(new GuiDownloadTerrain(this));
}
this.mc.setDimensionAndSpawnPlayer(par1Packet9Respawn.respawnDimension);