   (-write-int conn z)
   (-write-int conn sounddata))
 
+(defn write-packet-newinvalidstate [conn {reason :reason}]
+  (-write-byte conn (:newinvalidstate packet-ids))
+
+  (-write-byte conn reason))
+
 
 ; Writing Wrappers -----------------------------------------------------------------
 (defn flushc [conn]

    :y (-read-byte conn)
    :z (-read-int conn)
    :sounddata (-read-int conn)))


; Reading Wrappers -----------------------------------------------------------------

        :playnoteblock             (read-packet-playnoteblock conn)
        :explosion                 (read-packet-explosion conn)
        :soundeffect               (read-packet-soundeffect conn)
        :newinvalidstate           (read-packet-newinvalidstate conn)

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