877958097a6a
MOAR
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Fri, 24 Jun 2011 19:04:16 -0400 |
parents | e71cf74a5fbf |
children | 14a4d006ee84 |
branches/tags | (none) |
files | src/clojurecraft/core.clj |
Changes
--- 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) ))