mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -04:00
Patch UUID processing (Fixes #92)
This commit is contained in:
parent
f80b2aa1b3
commit
e76d2743e1
5
index.js
5
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();
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user