mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 21:11:04 -05:00
FML|HS: encode ClientHello
This commit is contained in:
parent
9bb788bb7a
commit
8af797a04c
1 changed files with 21 additions and 3 deletions
|
@ -32,15 +32,17 @@ client.on('chat', function(packet) {
|
|||
|
||||
var proto = new ProtoDef();
|
||||
// http://wiki.vg/Minecraft_Forge_Handshake
|
||||
proto.addType('FML|HS', [
|
||||
proto.addType('FML|HS',
|
||||
[
|
||||
'container',
|
||||
[
|
||||
{
|
||||
"name": "discriminator",
|
||||
"type": "byte"
|
||||
},
|
||||
|
||||
// ServerHello
|
||||
{
|
||||
// ServerHello
|
||||
"name": "fmlProtocolVersion",
|
||||
"type": [
|
||||
"switch",
|
||||
|
@ -76,9 +78,25 @@ proto.addType('FML|HS', [
|
|||
"default": "void"
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ClientHello
|
||||
{
|
||||
"name": "fmlProtocolVersion",
|
||||
"type": [
|
||||
"switch",
|
||||
{
|
||||
"compareTo": "discriminator",
|
||||
"fields": {
|
||||
"1": "byte"
|
||||
},
|
||||
"default": "void"
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
client.on('custom_payload', function(packet) {
|
||||
var channel = packet.channel;
|
||||
|
|
Loading…
Reference in a new issue