示例#1
0
 public static void LoginRequest(MinecraftClient client, IPacket _packet)
 {
     var packet = (LoginRequestPacket)_packet;
     client.EntityId = packet.EntityId;
     client.Spawned = true;
     client.OnLoggedIn();
     // Initialize world
     client.World = new ReadOnlyWorld();
     client.LevelInformation = new LevelInformation(packet);
     client.OnWorldInitialized();
 }
示例#2
0
 public static void LoginRequest(MinecraftClient client, IPacket _packet)
 {
     var packet = (LoginRequestPacket)_packet;
     client.EntityId = packet.EntityId;
     client.Spawned = true;
     client.OnLoggedIn();
     // Initialize world
     client.Level = new Level();
     client.Level.Difficulty = packet.Difficulty;
     client.Level.GameMode = packet.GameMode;
     client.Level.World.LevelType = packet.LevelType;
     client.OnWorldInitialized();
 }
示例#3
0
        public static void LoginRequest(MinecraftClient client, IPacket _packet)
        {
            var packet = (LoginRequestPacket)_packet;

            client.EntityId   = packet.EntityId;
            client.IsLoggedIn = true;
            client.OnLoggedIn();
            LogProvider.Log("Logged in.");

            // Initialize world
            client.World            = new ReadOnlyWorld();
            client.LevelInformation = new LevelInformation(packet);
            client.OnWorldInitialized();
        }