Protocol JSON

From wiki.vg
Jump to navigation Jump to search

This page is an up to date JSON representation of the Minecraft protocol. It is designed so that you may programtically create a packet parser in your language of choice.

{

   "0x00": [
       {
           "TYPE": "INT",
           "NAME": "id"
       }
   ],
   "0x01": [
       {
           "TYPE": "INT",
           "NAME": "entityID"
       },
       {
           "TYPE": "STRING",
           "NAME": "levelType"
       },
       {
           "TYPE": "BYTE",
           "NAME": "gameMode"
       },
       {
           "TYPE": "BYTE",
           "NAME": "dimension"
       },
       {
           "TYPE": "BYTE",
           "NAME": "difficulty"
       },
       {
           "TYPE": "BYTE",
           "NAME": "unused"
       },
       {
           "TYPE": "BYTE",
           "NAME": "maxPlayers"
       }
   ],
   "0x02": [
       {
           "TYPE": "BYTE",
           "NAME": "version"
       },
       {
           "TYPE": "STRING",
           "NAME": "username"
       },
       {
           "TYPE": "STRING",
           "NAME": "host"
       },
       {
           "TYPE": "INT",
           "NAME": "port"
       }
   ],
   "0x03": [
       {
           "TYPE": "INT",
           "NAME": "x"
       },
       {
           "TYPE": "INT",
           "NAME": "y"
       },
       {
           "TYPE": "INT",
           "NAME": "z"
       }
   ],
   "0x04": [
       {
           "TYPE": "LONG",
           "NAME": "time"
       }
   ]

}