Patch UUID processing (Fixes #92)

This commit is contained in:
roblabla 2014-09-05 12:49:39 +02:00
parent f80b2aa1b3
commit e76d2743e1
2 changed files with 5 additions and 2 deletions

View File

@ -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();

View File

@ -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,