diff --git a/data/protocol.json b/data/protocol.json index 7595a7c..4fe3fcd 100644 --- a/data/protocol.json +++ b/data/protocol.json @@ -6,6 +6,64 @@ "countType":"short" } ], + "vector3": [ + "container", + [ + { + "name": "x", + "type": "f32" + }, + { + "name": "y", + "type": "f32" + }, + { + "name": "z", + "type": "f32" + } + ] + ], + "entitylocations": [ + [ + "array", + { + "countType":"i16", + "type": [ + "container", + [ + { + "name": "eid", + "type": "i64" + }, + { + "name": "x", + "type": "f32" + }, + { + "name": "y", + "type": "f32" + }, + { + "name": "z", + "type": "f32" + }, + { + "name": "yaw", + "type": "f32" + }, + { + "name": "headYaw", + "type": "f32" + }, + { + "name": "pitch", + "type": "f32" + } + ] + ] + } + ] + ], "packet": [ "container", [ diff --git a/src/datatypes.js b/src/datatypes.js index 9dac09a..561013d 100644 --- a/src/datatypes.js +++ b/src/datatypes.js @@ -14,8 +14,7 @@ function writeUUID(value, buffer, offset) { } module.exports = { - 'uuid': [readUUID, writeUUID, 16], // done - 'vector3': [readVector3, writeVector3, sizeOfVector3] + 'uuid': [readUUID, writeUUID, 16], 'metadatadictionary': [readLTriad, writeLTriad, 3], 'skin': [readIpAddress, writeIpAddress, 4],