       (cond
         (= packet-type :keepalive) (write-packet-handshake conn payload)
         (= packet-type :handshake) (write-packet-handshake conn payload)
-        (= packet-type :login) (write-packet-login conn payload)
+        (= packet-type :login)     (write-packet-login conn payload)
+        (= packet-type :chat)      (write-packet-chat conn payload)
+        (= packet-type :respawn)   (write-packet-respawn conn payload)
         )
       (flushc conn))
 

     0x06 :spawnposition
     0x07 :useentity
     0x08 :updatehealth
})
(def packet-ids (apply assoc {} (mapcat reverse packet-types)))


(defn read-packet-updatehealth [conn]
      (-> {}
          (assoc :health (-read-short conn))))

(defn read-packet-respawn [conn]
      (-> {}
          (assoc :world (-read-byte conn))))


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