   (-write-short conn velocityx)
   (-write-short conn velocityy)
   (-write-short conn velocityz))
+
+(defn write-packet-attachentity [conn {eid :eid vehicleid :vehicleid}]
+  (-write-byte conn (:attachentity packet-ids))
+
+  (-write-int conn eid)
+  (-write-int conn vehicleid))
 
 
 ; Writing Wrappers -----------------------------------------------------------------

    (= packet-type :entitypainting)       (write-packet-entitypainting conn payload)
    (= packet-type :stanceupdate)         (write-packet-stanceupdate conn payload)
    (= packet-type :entityvelocity)       (write-packet-entityvelocity conn payload)
    )
  (flushc conn))


        (= packet-type :entityrelativemove)        (read-packet-entityrelativemove conn)
        (= packet-type :entitylook)                (read-packet-entitylook conn)
        (= packet-type :entitylookandrelativemove) (read-packet-entitylookandrelativemove conn)
        (= packet-type :entityteleport)            (read-packet-entityteleport conn)
        (= packet-type :entitystatus)              (read-packet-entitystatus conn)
        (= packet-type :attachentity)              (read-packet-attachentity conn)

        :else (str "UNKNOWN PACKET TYPE: " packet-id)
        ))
