       (doto (:out @conn)
          (.writeChars s)))
 
+(defn -write-bool [conn b]
+      (println (str "-> BOOL: " b))
+      (doto (:out @conn)
+         (.writeBoolean b)))
+
 
 ; Writing Packets ------------------------------------------------------------------
 (defn write-packet-keepalive [conn _]

   (let [i (.readLong (:in @conn))]
     i))

(defn -read-string16 [conn]
  (let [str-len (.readShort (:in @conn))
        s (apply str (repeatedly str-len #(.readChar (:in @conn))))]

(def minecraft-local {:name "localhost" :port 25565})

; Packet Type Maps -----------------------------------------------------------------
(def packet-types {
     0x00 :keepalive 
     0x01 :login 
     0x02 :handshake 
     0x03 :chat 
     0x04 :timeupdate 
     0x05 :equipment 
})
(def packet-ids (apply assoc {} (mapcat reverse packet-types)))

(declare conn-handler)

