Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-52817

"Add player" packets and "Remove player" packets being sent out of order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.7.9
    • Minecraft 1.7.8
    • None
    • Vanilla Server
      Vanilla Client
    • Unconfirmed

      Jimmy and Jenny are playing on their realms server, Jimmys connection is a little bit slow but he decides to have a bit of fun by teleporting himself far away and back again very quickly.

      Jenny gets disconnected because Jimmys spawn named entity packet gets sent before his despawn entity packet due to him being despawned and spawned in the same tick, as far as the server is concerned.

      Relevant client code causing the issue;

      public void a(gb paramgb)
        {
          double d1 = paramgb.f() / 32.0D;
          double d2 = paramgb.g() / 32.0D;
          double d3 = paramgb.h() / 32.0D;
          float f1 = paramgb.i() * 360 / 256.0F;
          float f2 = paramgb.j() * 360 / 256.0F;
          GameProfile localGameProfile = paramgb.e();
      
          if (this.g.a(localGameProfile.getId()) != null) {
            this.e.a(new fr("disconnect.genericReason", new Object[] { "Server sent invalid player data." }));
          }
      
          if ((this.e.h()) && (this.f.E() != null) && (!this.f.E().d())) {
            try {
              this.f.ac().getTextures(localGameProfile, true);
            } catch (InsecureTextureException localInsecureTextureException) {
              if (!(localInsecureTextureException instanceof InsecureTextureException.OutdatedTextureException)) {
                this.e.a(new fr("disconnect.genericReason", new Object[] { "Outdated server! Pretending to be 1.7.8" }));
              }
            }
          }
      
          bnx localbnx = new bnx(this.f.f, paramgb.e());
          localbnx.p = (localbnx.S = localbnx.bZ = paramgb.f());
          localbnx.q = (localbnx.T = localbnx.ca = paramgb.g());
          localbnx.r = (localbnx.U = localbnx.cb = paramgb.h());
      
          int m = paramgb.k();
          if (m == 0)
            localbnx.bm.a[localbnx.bm.c] = null;
          else {
            localbnx.bm.a[localbnx.bm.c] = new adc(ada.d(m), 1, 0);
          }
          localbnx.a(d1, d2, d3, f1, f2);
          this.g.a(paramgb.d(), localbnx);
      
          List localList = paramgb.c();
          if (localList != null)
            localbnx.y().a(localList);
        }
      

            dinnerbone [Mojang] Nathan Adams
            codename_B Ben Smith
            Votes:
            7 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: