 
       (-write-bool conn world))
 
+(defn write-packet-player [conn {onground :onground}]
+      (-write-byte conn (:player packet-ids))
+
+      (-write-bool conn onground))
+
+(defn write-packet-playerposition [conn {x :x y :y stance :stance z :z onground :onground}]
+      (-write-byte conn (:playerposition packet-ids))
+
+      (-write-double conn x)
+      (-write-double conn y)
+      (-write-double conn stance)
+      (-write-double conn z)
+      (-write-bool conn onground)
+      )
+
 
 ; Writing Wrappers -----------------------------------------------------------------
 (defn flushc [conn]


(defn write-packet [conn packet-type payload]
      (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 :chat)      (write-packet-chat conn payload)
        (= packet-type :respawn)   (write-packet-respawn conn payload)
        )
      (flushc conn))


      (doto (:out @conn)
         (.writeLong (int i))))

(defn -write-double [conn i]
      (println (str "-> DOUBLE: " i))
      (doto (:out @conn)
         (.writeDouble (int i))))

(defn -write-string16 [conn s]
      (-write-short conn (count s))
      (println (str "-> STRING: " s))
