{ "version": "1.0.0", "opcodes": { "Login": { "id": "0x01", "fields": [] }, "Position": { "id": "0x02", "fields": [ {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"}, {"name": "z", "type": "float32"} ] }, "Spawn": { "id": "0x03", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"}, {"name": "z", "type": "float32"}, {"name": "color", "type": "string"} ] }, "Move": { "id": "0x04", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "dx", "type": "float32"}, {"name": "dy", "type": "float32"}, {"name": "dz", "type": "float32"} ] }, "Update": { "id": "0x05", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"}, {"name": "z", "type": "float32"} ] }, "PlayerJoined": { "id": "0x06", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"}, {"name": "z", "type": "float32"}, {"name": "color", "type": "string"} ] }, "PlayerLeft": { "id": "0x07", "fields": [ {"name": "playerId", "type": "uint32"} ] }, "PlayerList": { "id": "0x08", "fields": [ {"name": "count", "type": "uint8"}, {"name": "players", "type": "array", "itemType": { "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "x", "type": "float32"}, {"name": "y", "type": "float32"}, {"name": "z", "type": "float32"}, {"name": "color", "type": "string"} ] }} ] }, "ChangeColor": { "id": "0x09", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "color", "type": "string"} ] }, "ColorChanged": { "id": "0x0A", "fields": [ {"name": "playerId", "type": "uint32"}, {"name": "color", "type": "string"} ] } }, "types": { "uint8": {"size": 1, "encoding": "little-endian"}, "uint32": {"size": 4, "encoding": "little-endian"}, "float32": {"size": 4, "encoding": "little-endian"}, "string": {"encoding": "length-prefixed", "lengthType": "uint8"} } }