diff --git a/index.js b/index.js index f48a9c9..5796a9e 100644 --- a/index.js +++ b/index.js @@ -178,13 +178,16 @@ function createServer(options) { return; } client.uuid = uuid; + // Convert to a valid UUID until the session server updates and does + // it automatically + client.uuid = client.uuid.replace(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/, "$1-$2-$3-$4-$5"); loginClient(); }); } } function loginClient() { - client.write(0x02, {uuid: (client.uuid | 0).toString(10), username: client.username}); + client.write(0x02, {uuid: (client.uuid || 0).toString(10), username: client.username}); client.state = states.PLAY; loggedIn = true; startKeepAlive(); diff --git a/lib/protocol.js b/lib/protocol.js index 13e43ac..3d7756d 100644 --- a/lib/protocol.js +++ b/lib/protocol.js @@ -1355,7 +1355,7 @@ function parsePacket(buffer, state, isServer, packetsToParse) { module.exports = { version: 5, - minecraftVersion: '1.7.6', + minecraftVersion: '1.7.10', sessionVersion: 13, parsePacket: parsePacket, createPacketBuffer: createPacketBuffer,