 
       (-write-string16 conn message))
 
+(defn write-packet-respawn [conn {world :world}]
+      (-write-byte conn (:respawn packet-ids))
+
+      (-write-bool conn world))
+
 
 ; Writing Wrappers -----------------------------------------------------------------
 (defn flushc [conn]

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


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

