mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 21:24:25 -04:00
packet 0xfe (ping): updated to support 1.6.1
This commit is contained in:
parent
9c3f671a22
commit
1ac3e12099
10
lib/ping.js
10
lib/ping.js
@ -33,7 +33,15 @@ function ping(options, cb) {
|
|||||||
cb(err);
|
cb(err);
|
||||||
});
|
});
|
||||||
client.on('connect', function() {
|
client.on('connect', function() {
|
||||||
client.write(0xfe, { magic: 1 });
|
client.write(0xfe, {
|
||||||
|
unused1: 1,
|
||||||
|
customPayloadId: 250,
|
||||||
|
magicText: "MC|PingHost",
|
||||||
|
len: 3 + ip.length + 4,
|
||||||
|
magic: 73,
|
||||||
|
ip: host,
|
||||||
|
port: port,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var start = Date.now();
|
var start = Date.now();
|
||||||
|
@ -480,7 +480,13 @@ var packets = {
|
|||||||
{ name: "verifyToken", type: "byteArray16" }
|
{ name: "verifyToken", type: "byteArray16" }
|
||||||
],
|
],
|
||||||
0xfe: [
|
0xfe: [
|
||||||
{ name: "magic", type: "byte" }
|
{ name: "unused1", type: "byte" },
|
||||||
|
{ name: "customPayloadId", type: "byte" },
|
||||||
|
{ name: "magicText", type: "string" },
|
||||||
|
{ name: "len", type: "short" },
|
||||||
|
{ name: "magic", type: "byte" },
|
||||||
|
{ name: "ip", type: "string" },
|
||||||
|
{ name: "port", type: "int" }
|
||||||
],
|
],
|
||||||
0xff: [
|
0xff: [
|
||||||
{ name: "reason", type: "string" }
|
{ name: "reason", type: "string" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user