   (-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))


    (assoc :dz (-read-byte conn))
    (assoc :yaw (-read-byte conn))
    (assoc :pitch (-read-byte conn))))

(defn read-packet-entityteleport [conn]
  (-> {}
    (assoc :eid (-read-int conn))
    (assoc :x (-read-int conn))
    (assoc :y (-read-int conn))
    (assoc :z (-read-int conn))
    (assoc :yaw (-read-byte conn))
    (assoc :pitch (-read-byte conn))))

(defn read-packet-entitystatus [conn]
  (-> {}
    (assoc :eid (-read-int conn))
    (assoc :entitystatus (-read-byte conn))))

(defn read-packet-attachentity [conn]
  (-> {}
    (assoc :eid (-read-int conn))
    (assoc :vehicleid (-read-int conn))))


; Reading Wrappers -----------------------------------------------------------------
