public void HandleRespawn(MinecraftClient client, IPacket packet) { var Respawn = (CBRespawn)packet; client.MinecraftWorld = new WorldClass(); client.MinecraftWorld.dimension = (sbyte)Respawn.Dimension; client.MinecraftWorld.difficulty = Respawn.Difficulty; client.MinecraftWorld.levelType = Respawn.LevelType; if (client.ThisPlayer == null) client.ThisPlayer = new Player(); client.ThisPlayer.gameMode = Respawn.Gamemode; client.RaisePlayerRespawn(); }
public void HandleRespawn(MinecraftClient client, IPacket packet) { var respawn = (CbRespawn)packet; client.MinecraftWorld = new WorldClass { Dimension = (sbyte) respawn.Dimension, Difficulty = respawn.Difficulty, LevelType = respawn.LevelType }; if (client.ThisPlayer == null) client.ThisPlayer = new Player(); client.ThisPlayer.GameMode = respawn.Gamemode; client.RaisePlayerRespawn(); }