public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_) {
    func_72380_a(p_72355_2_);
    p_72355_2_.func_70029_a(field_72400_f.func_71218_a(p_72355_2_.field_71093_bK));
    p_72355_2_.field_71134_c.func_73080_a((WorldServer) p_72355_2_.field_70170_p);
    String s = "local";
    if (p_72355_1_.func_74430_c() != null) {
      s = p_72355_1_.func_74430_c().toString();
    }
    field_72406_a.info(
        (new StringBuilder())
            .append(p_72355_2_.field_71092_bJ)
            .append("[")
            .append(s)
            .append("] logged in with entity id ")
            .append(p_72355_2_.field_70157_k)
            .append(" at (")
            .append(p_72355_2_.field_70165_t)
            .append(", ")
            .append(p_72355_2_.field_70163_u)
            .append(", ")
            .append(p_72355_2_.field_70161_v)
            .append(")")
            .toString());
    WorldServer worldserver = field_72400_f.func_71218_a(p_72355_2_.field_71093_bK);
    ChunkCoordinates chunkcoordinates = worldserver.func_72861_E();
    func_72381_a(p_72355_2_, null, worldserver);
    NetServerHandler netserverhandler = new NetServerHandler(field_72400_f, p_72355_1_, p_72355_2_);
    netserverhandler.func_72567_b(
        new Packet1Login(
            p_72355_2_.field_70157_k,
            worldserver.func_72912_H().func_76067_t(),
            p_72355_2_.field_71134_c.func_73081_b(),
            worldserver.func_72912_H().func_76093_s(),
            worldserver.field_73011_w.field_76574_g,
            worldserver.field_73013_u,
            worldserver.func_72800_K(),
            func_72352_l()));
    netserverhandler.func_72567_b(
        new Packet6SpawnPosition(
            chunkcoordinates.field_71574_a,
            chunkcoordinates.field_71572_b,
            chunkcoordinates.field_71573_c));
    netserverhandler.func_72567_b(new Packet202PlayerAbilities(p_72355_2_.field_71075_bZ));
    func_72354_b(p_72355_2_, worldserver);
    func_72384_a(
        new Packet3Chat(
            (new StringBuilder())
                .append("\247e")
                .append(p_72355_2_.field_71092_bJ)
                .append(" joined the game.")
                .toString()));
    func_72377_c(p_72355_2_);
    netserverhandler.func_72569_a(
        p_72355_2_.field_70165_t,
        p_72355_2_.field_70163_u,
        p_72355_2_.field_70161_v,
        p_72355_2_.field_70177_z,
        p_72355_2_.field_70125_A);
    field_72400_f.func_71212_ac().func_71745_a(netserverhandler);
    netserverhandler.func_72567_b(new Packet4UpdateTime(worldserver.func_72820_D()));
    if (field_72400_f.func_71202_P().length() > 0) {
      p_72355_2_.func_71115_a(field_72400_f.func_71202_P(), field_72400_f.func_71227_R());
    }
    PotionEffect potioneffect;
    for (Iterator iterator = p_72355_2_.func_70651_bq().iterator();
        iterator.hasNext();
        netserverhandler.func_72567_b(
            new Packet41EntityEffect(p_72355_2_.field_70157_k, potioneffect))) {
      potioneffect = (PotionEffect) iterator.next();
    }

    p_72355_2_.func_71116_b();
  }
 public void func_72356_a(EntityPlayerMP p_72356_1_, int p_72356_2_) {
   int i = p_72356_1_.field_71093_bK;
   WorldServer worldserver = field_72400_f.func_71218_a(p_72356_1_.field_71093_bK);
   p_72356_1_.field_71093_bK = p_72356_2_;
   WorldServer worldserver1 = field_72400_f.func_71218_a(p_72356_1_.field_71093_bK);
   p_72356_1_.field_71135_a.func_72567_b(
       new Packet9Respawn(
           p_72356_1_.field_71093_bK,
           (byte) p_72356_1_.field_70170_p.field_73013_u,
           worldserver1.func_72912_H().func_76067_t(),
           worldserver1.func_72800_K(),
           p_72356_1_.field_71134_c.func_73081_b()));
   worldserver.func_72973_f(p_72356_1_);
   p_72356_1_.field_70128_L = false;
   double d = p_72356_1_.field_70165_t;
   double d1 = p_72356_1_.field_70161_v;
   double d2 = 8D;
   if (p_72356_1_.field_71093_bK == -1) {
     d /= d2;
     d1 /= d2;
     p_72356_1_.func_70012_b(
         d, p_72356_1_.field_70163_u, d1, p_72356_1_.field_70177_z, p_72356_1_.field_70125_A);
     if (p_72356_1_.func_70089_S()) {
       worldserver.func_72866_a(p_72356_1_, false);
     }
   } else if (p_72356_1_.field_71093_bK == 0) {
     d *= d2;
     d1 *= d2;
     p_72356_1_.func_70012_b(
         d, p_72356_1_.field_70163_u, d1, p_72356_1_.field_70177_z, p_72356_1_.field_70125_A);
     if (p_72356_1_.func_70089_S()) {
       worldserver.func_72866_a(p_72356_1_, false);
     }
   } else {
     ChunkCoordinates chunkcoordinates = worldserver1.func_73054_j();
     d = chunkcoordinates.field_71574_a;
     p_72356_1_.field_70163_u = chunkcoordinates.field_71572_b;
     d1 = chunkcoordinates.field_71573_c;
     p_72356_1_.func_70012_b(d, p_72356_1_.field_70163_u, d1, 90F, 0.0F);
     if (p_72356_1_.func_70089_S()) {
       worldserver.func_72866_a(p_72356_1_, false);
     }
   }
   if (i != 1) {
     d = MathHelper.func_76125_a((int) d, 0xfe363d00, 0x1c9c300);
     d1 = MathHelper.func_76125_a((int) d1, 0xfe363d00, 0x1c9c300);
     if (p_72356_1_.func_70089_S()) {
       worldserver1.func_72838_d(p_72356_1_);
       p_72356_1_.func_70012_b(
           d, p_72356_1_.field_70163_u, d1, p_72356_1_.field_70177_z, p_72356_1_.field_70125_A);
       worldserver1.func_72866_a(p_72356_1_, false);
       (new Teleporter()).func_77185_a(worldserver1, p_72356_1_);
     }
   }
   p_72356_1_.func_70029_a(worldserver1);
   func_72375_a(p_72356_1_, worldserver);
   p_72356_1_.field_71135_a.func_72569_a(
       p_72356_1_.field_70165_t,
       p_72356_1_.field_70163_u,
       p_72356_1_.field_70161_v,
       p_72356_1_.field_70177_z,
       p_72356_1_.field_70125_A);
   p_72356_1_.field_71134_c.func_73080_a(worldserver1);
   func_72354_b(p_72356_1_, worldserver1);
   func_72385_f(p_72356_1_);
   PotionEffect potioneffect;
   for (Iterator iterator = p_72356_1_.func_70651_bq().iterator();
       iterator.hasNext();
       p_72356_1_.field_71135_a.func_72567_b(
           new Packet41EntityEffect(p_72356_1_.field_70157_k, potioneffect))) {
     potioneffect = (PotionEffect) iterator.next();
   }
 }