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 b(PacketDataSerializer packetdataserializer) throws IOException { packetdataserializer.writeByte(this.a); packetdataserializer.writeShort(this.b); packetdataserializer.writeBoolean(this.c); }