コード例 #1
0
  @Override
  public void a(PacketDataSerializer packetdataserializer)
      throws IOException { // CraftBukkit - added throws
    a = packetdataserializer.a();
    UUID uuid = UUID.fromString(packetdataserializer.c(36));

    b = new GameProfile(uuid, packetdataserializer.c(16));
    int i = packetdataserializer.a();

    for (int j = 0; j < i; ++j) {
      String s = packetdataserializer.c(32767);
      String s1 = packetdataserializer.c(32767);
      String s2 = packetdataserializer.c(32767);

      b.getProperties().put(s, new Property(s, s1, s2));
    }

    c = packetdataserializer.readInt();
    d = packetdataserializer.readInt();
    e = packetdataserializer.readInt();
    f = packetdataserializer.readByte();
    g = packetdataserializer.readByte();
    h = packetdataserializer.readShort();
    j = DataWatcher.b(packetdataserializer);
  }
コード例 #2
0
 public void b(PacketDataSerializer packetdataserializer) throws IOException {
   packetdataserializer.writeDouble(this.x);
   packetdataserializer.writeDouble(this.y);
   packetdataserializer.writeDouble(this.z);
   packetdataserializer.writeFloat(this.yaw);
   packetdataserializer.writeFloat(this.pitch);
   super.b(packetdataserializer);
 }
コード例 #3
0
  @Override
  public void b(PacketDataSerializer var1) throws IOException {
    var1.a(b);

    for (int var2 = 0; var2 < 4; ++var2) {
      var1.a(c[var2]);
    }
  }
コード例 #4
0
 public void a(PacketDataSerializer packetdataserializer) throws IOException {
   this.x = packetdataserializer.readDouble();
   this.y = packetdataserializer.readDouble();
   this.z = packetdataserializer.readDouble();
   this.yaw = packetdataserializer.readFloat();
   this.pitch = packetdataserializer.readFloat();
   super.a(packetdataserializer);
 }
コード例 #5
0
  @Override
  public void a(PacketDataSerializer var1) throws IOException {
    b = var1.e();
    c = new class_eu[4];

    for (int var2 = 0; var2 < 4; ++var2) {
      c[var2] = var1.f();
    }
  }
コード例 #6
0
  @Override
  public void encode(PacketDataSerializer var1) throws IOException {
    var1.writeFloat((float) a);
    var1.writeFloat((float) b);
    var1.writeFloat((float) c);
    var1.writeFloat(d);
    var1.writeInt(e.size());
    int var2 = (int) a;
    int var3 = (int) b;
    int var4 = (int) c;
    Iterator var5 = e.iterator();

    while (var5.hasNext()) {
      class_cj var6 = (class_cj) var5.next();
      int var7 = var6.n() - var2;
      int var8 = var6.o() - var3;
      int var9 = var6.p() - var4;
      var1.writeByte(var7);
      var1.writeByte(var8);
      var1.writeByte(var9);
    }

    var1.writeFloat(f);
    var1.writeFloat(g);
    var1.writeFloat(h);
  }
コード例 #7
0
  public void decode(PacketDataSerializer var1) throws IOException {
    this.a = var1.readVarInt();
    this.b = var1.readByte();
    this.c = new class_ave[var1.readVarInt()];

    for (int var2 = 0; var2 < this.c.length; ++var2) {
      short var3 = (short) var1.readByte();
      this.c[var2] =
          new class_ave(
              (byte) (var3 >> 4 & 15), var1.readByte(), var1.readByte(), (byte) (var3 & 15));
    }

    this.f = var1.readUnsignedByte();
    if (this.f > 0) {
      this.g = var1.readUnsignedByte();
      this.d = var1.readUnsignedByte();
      this.e = var1.readUnsignedByte();
      this.h = var1.readArray();
    }
  }
コード例 #8
0
  public void encode(PacketDataSerializer var1) throws IOException {
    var1.writeVarInt(this.a);
    var1.writeByte(this.b);
    var1.writeVarInt(this.c.length);
    class_ave[] var2 = this.c;
    int var3 = var2.length;

    for (int var4 = 0; var4 < var3; ++var4) {
      class_ave var5 = var2[var4];
      var1.writeByte((var5.a() & 15) << 4 | var5.d() & 15);
      var1.writeByte(var5.b());
      var1.writeByte(var5.c());
    }

    var1.writeByte(this.f);
    if (this.f > 0) {
      var1.writeByte(this.g);
      var1.writeByte(this.d);
      var1.writeByte(this.e);
      var1.writeArray(this.h);
    }
  }
コード例 #9
0
  @Override
  public void decode(PacketDataSerializer var1) throws IOException {
    a = var1.readFloat();
    b = var1.readFloat();
    c = var1.readFloat();
    d = var1.readFloat();
    int var2 = var1.readInt();
    e = Lists.newArrayListWithCapacity(var2);
    int var3 = (int) a;
    int var4 = (int) b;
    int var5 = (int) c;

    for (int var6 = 0; var6 < var2; ++var6) {
      int var7 = var1.readByte() + var3;
      int var8 = var1.readByte() + var4;
      int var9 = var1.readByte() + var5;
      e.add(new class_cj(var7, var8, var9));
    }

    f = var1.readFloat();
    g = var1.readFloat();
    h = var1.readFloat();
  }
コード例 #10
0
 public void a(PacketDataSerializer var1) throws IOException {
   this.a =
       (PacketPlayInClientCommand.EnumClientCommand)
           var1.a(PacketPlayInClientCommand.EnumClientCommand.class);
 }
コード例 #11
0
 public void b(PacketDataSerializer packetdataserializer) throws IOException {
   packetdataserializer.writeByte(this.a);
 }
コード例 #12
0
 public void a(PacketDataSerializer packetdataserializer) throws IOException {
   this.a = packetdataserializer.readByte();
 }
コード例 #13
0
 public void a(PacketDataSerializer var1) throws IOException {
   this.a = var1.c(40);
   this.b =
       (PacketPlayInResourcePackStatus.EnumResourcePackStatus)
           var1.a(PacketPlayInResourcePackStatus.EnumResourcePackStatus.class);
 }
コード例 #14
0
 public void a(PacketDataSerializer packetdataserializer) throws IOException {
   this.a = packetdataserializer.readUnsignedByte();
   this.b = packetdataserializer.readShort();
   this.c = packetdataserializer.readBoolean();
 }
コード例 #15
0
 public void a(PacketDataSerializer packetdataserializer) throws IOException {
   this.a = packetdataserializer.e();
   this.b = packetdataserializer.h();
 }
コード例 #16
0
 @Override
 public void a(PacketDataSerializer var1) throws IOException {
   a = var1.g();
 }
コード例 #17
0
 @Override
 public void b(PacketDataSerializer var1) throws IOException {
   var1.b(a);
 }
コード例 #18
0
 public void a(PacketDataSerializer packetdataserializer) throws IOException {
   this.f = packetdataserializer.readUnsignedByte() != 0;
 }
コード例 #19
0
 public void b(PacketDataSerializer packetdataserializer) throws IOException {
   packetdataserializer.b(this.a);
   packetdataserializer.a(this.b);
 }
コード例 #20
0
  @Override
  public void b(PacketDataSerializer packetdataserializer)
      throws IOException { // CraftBukkit - added throws
    packetdataserializer.b(a);

    UUID uuid = b.getId();
    // Spigot start - protocol patch
    if (packetdataserializer.version < 20) {
      packetdataserializer.a(
          uuid == null
              ? ""
              : packetdataserializer.version >= 5
                  ? uuid.toString()
                  : uuid.toString().replaceAll("-", "")); // Spigot
      packetdataserializer.a(
          b.getName().length() > 16
              ? b.getName().substring(0, 16)
              : b.getName()); // CraftBukkit - Limit name length to 16 characters
      if (packetdataserializer.version >= 5) { // Spigot
        packetdataserializer.b(b.getProperties().size());
        Iterator iterator = b.getProperties().values().iterator();

        while (iterator.hasNext()) {
          Property property = (Property) iterator.next();

          packetdataserializer.a(property.getName());
          packetdataserializer.a(property.getValue());
          packetdataserializer.a(property.getSignature());
        }
      }
    } else {
      packetdataserializer.writeUUID(uuid);
    }
    // Spigot end

    packetdataserializer.writeInt(c);
    packetdataserializer.writeInt(d);
    packetdataserializer.writeInt(e);
    packetdataserializer.writeByte(f);
    packetdataserializer.writeByte(g);
    // Spigot start - protocol patch
    if (packetdataserializer.version >= 47) {
      packetdataserializer.writeShort(org.spigotmc.SpigotDebreakifier.getItemId(h));
    } else {
      packetdataserializer.writeShort(h);
    }
    i.a(packetdataserializer);
  }
コード例 #21
0
 public void b(PacketDataSerializer packetdataserializer) throws IOException {
   packetdataserializer.writeByte(this.a);
   packetdataserializer.writeShort(this.b);
   packetdataserializer.writeBoolean(this.c);
 }
コード例 #22
0
 public void a(PacketDataSerializer packetdataserializer) {
   this.b = (ServerPing) a.fromJson(packetdataserializer.c(32767), ServerPing.class);
 }
コード例 #23
0
 public void b(PacketDataSerializer var1) throws IOException {
   var1.a(this.a);
   var1.a((Enum) this.b);
 }
コード例 #24
0
 public void b(PacketDataSerializer packetdataserializer) {
   packetdataserializer.a(a.toJson(this.b));
 }