@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); }
public void b(long var1) { while ((var1 & -128L) != 0L) { writeByte((int) (var1 & 127L) | 128); var1 >>>= 7; } writeByte((int) var1); }
public void b(int var1) { while ((var1 & -128) != 0) { writeByte((var1 & 127) | 128); var1 >>>= 7; } writeByte(var1); }
public void a(class_dn var1) { if (var1 == null) { writeByte(0); } else { try { class_dx.a(var1, (DataOutput) (new ByteBufOutputStream(this))); } catch (IOException var3) { throw new EncoderException(var3); } } }
public void a(class_aco var1) { if (var1 == null) { writeShort(-1); } else { writeShort(Item.b(var1.b())); writeByte(var1.b); writeShort(var1.i()); class_dn var2 = null; if (var1.b().m() || var1.b().p()) { var2 = var1.o(); } this.a(var2); } }
@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); }
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); } }
public void b(PacketDataSerializer packetdataserializer) throws IOException { packetdataserializer.writeByte(this.a); packetdataserializer.writeShort(this.b); packetdataserializer.writeBoolean(this.c); }
public void b(PacketDataSerializer packetdataserializer) throws IOException { packetdataserializer.writeByte(this.a); }