mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
Bump MINOR, UUIDs are now represented as dashed string
This commit is contained in:
parent
f337b49f15
commit
452be2b196
3 changed files with 5 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minecraft-protocol",
|
||||
"version": "0.14.1-GH",
|
||||
"version": "0.15.0-GH",
|
||||
"description": "Parse and serialize minecraft packets, plus authentication and encryption.",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
var nbt = require('prismarine-nbt');
|
||||
var utils = require("./utils");
|
||||
var numeric = require("./numeric");
|
||||
var uuid = require('node-uuid');
|
||||
|
||||
// TODO : remove type-specific, replace with generic containers and arrays.
|
||||
module.exports = {
|
||||
|
@ -14,21 +15,13 @@ module.exports = {
|
|||
|
||||
function readUUID(buffer, offset) {
|
||||
return {
|
||||
value: [
|
||||
buffer.readUInt32BE(offset),
|
||||
buffer.readUInt32BE(offset + 4),
|
||||
buffer.readUInt32BE(offset + 8),
|
||||
buffer.readUInt32BE(offset + 12),
|
||||
],
|
||||
value: uuid.unparse(buffer, offset),
|
||||
size: 16,
|
||||
};
|
||||
}
|
||||
|
||||
function writeUUID(value, buffer, offset) {
|
||||
buffer.writeUInt32BE(value[0], offset);
|
||||
buffer.writeUInt32BE(value[1], offset + 4);
|
||||
buffer.writeUInt32BE(value[2], offset + 8);
|
||||
buffer.writeUInt32BE(value[3], offset + 12);
|
||||
uuid.parse(value, buffer, offset);
|
||||
return offset + 16;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ var values = {
|
|||
velocityY: 2,
|
||||
velocityZ: 3,
|
||||
},
|
||||
'UUID': [42, 42, 42, 42],
|
||||
'UUID': "00112233-4455-6677-8899-aabbccddeeff",
|
||||
'position': {x: 12, y: 332, z: 4382821},
|
||||
'restBuffer': new Buffer(0),
|
||||
'condition': function(typeArgs) {
|
||||
|
|
Loading…
Reference in a new issue