   (-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 -----------------------------------------------------------------

    :blockchange          (write-packet-blockchange conn payload)
    :explosion            (write-packet-explosion conn payload)
    :soundeffect          (write-packet-soundeffect conn payload)
    :newinvalidstate      (write-packet-newinvalidstate conn payload)

    )
  (flushc conn))
