 (defn read-packet-newinvalidstate [conn]
   (assoc {}
     :reason (-read-byte conn)))
+
+(defn read-packet-thunderbolt [conn]
+  (assoc {}
+    :eid (-read-int conn)
+    :unknown (-read-bool conn)
+    :x (-read-int conn)
+    :y (-read-int conn)
+    :z (-read-int conn)))
+
+(defn read-packet-openwindow [conn]
+  (assoc {}
+    :windowid (-read-byte conn)
+    :inventorytype (-read-byte conn)
+    :windowtitle (-read-string8 conn)
+    :numberofslots (-read-byte conn)))
 
 
 ; Reading Wrappers -----------------------------------------------------------------

(defn -read-float [conn]
  (let [i (.readFloat (:in @conn))]
    i))

(defn -read-string16 [conn]
  (let [str-len (.readShort (:in @conn))

        :explosion                 (read-packet-explosion conn)
        :soundeffect               (read-packet-soundeffect conn)
        :newinvalidstate           (read-packet-newinvalidstate conn)
        :thunderbolt               (read-packet-thunderbolt conn)
        :openwindow                (read-packet-openwindow conn)

        :else (str "UNKNOWN PACKET TYPE: " packet-id)
        ))
