public static DataWriter getWriter(PacketId id) { DataWriter dw = new DataWriter(); dw.writeByte( 1); // amount of packets, defaults to 1. Hast obe a byte so it's easy to modify afterwards dw.writeData(id.getId(), DataBitHelper.PACKET_ID); return dw; }