       (doto (:out @conn)
          (.writeChars s)))
 
-(defn writ-chars [conn s]
-      (println (str "-> CHARS: " s))
-      (doto (:out @conn)
-         (.writeChars s)))
-
 
 ; Writing Packets ------------------------------------------------------------------
 (defn write-packet-handshake [conn {username :username}]


(defn write-packet [conn packet-type payload]
      (cond
        (= packet-type :handshake) (write-packet-handshake conn payload)
        (= packet-type :login) (write-packet-login conn payload)
        )

          (assoc :dimension (red-byte conn))))

(defn handle-packet [conn packet-id]
      (let [packet-id (int packet-id)
            packet-type (packet-types packet-id)]
        (println "\n----->")
        (println
          (cond
            (= packet-type :keepalive) (handle-packet-keepalive conn)
            (= packet-type :handshake) (handle-packet-handshake conn)
            (= packet-type :login) (handle-packet-login conn)
            :else (str "UNKNOWN PACKET TYPE: " packet-id)
            ))
        (println "\n\n\n")))
