# HG changeset patch # User Steve Losh # Date 1308956656 14400 # Node ID 877958097a6af905ba33410df404c373533c96b0 # Parent e71cf74a5fbfe11f8dfb058457424ff6771dfc55 MOAR diff -r e71cf74a5fbf -r 877958097a6a src/clojurecraft/core.clj --- a/src/clojurecraft/core.clj Fri Jun 24 19:01:56 2011 -0400 +++ b/src/clojurecraft/core.clj Fri Jun 24 19:04:16 2011 -0400 @@ -838,6 +838,13 @@ :text3 (-read-string16 conn) :text4 (-read-string16 conn))) +(defn read-packet-mapdata [conn] + (let [pretext (assoc {} + :unknown1 (-read-int conn) + :unknown2 (-read-short conn) + :textlength (-read-int conn))] + (assoc pretext :text (-read-bytearray (:textlength pretext))))) + ; Reading Wrappers ----------------------------------------------------------------- (defn read-packet [conn packet-id] @@ -896,6 +903,7 @@ :updateprogressbar (read-packet-updateprogressbar conn) :transaction (read-packet-transaction conn) :updatesign (read-packet-updatesign conn) + :mapdata (read-packet-mapdata conn) :else (str "UNKNOWN PACKET TYPE: " packet-id) ))