mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 21:11:04 -05:00
Decode fmlProtocolVersion in ServerHello
This commit is contained in:
parent
8018de5c29
commit
09b4dc8358
1 changed files with 15 additions and 2 deletions
|
@ -31,14 +31,27 @@ client.on('chat', function(packet) {
|
|||
});
|
||||
|
||||
var proto = new ProtoDef();
|
||||
// http://wiki.vg/User:Pokechu22/Forge#FML.7CHS_Packet_structure
|
||||
// http://wiki.vg/Minecraft_Forge_Handshake
|
||||
proto.addType('FML|HS', [
|
||||
'container',
|
||||
[
|
||||
{
|
||||
"name": "discriminator",
|
||||
"type": "byte"
|
||||
}
|
||||
},
|
||||
{
|
||||
// ServerHello
|
||||
"name": "fmlProtocolVersion",
|
||||
"type": [
|
||||
"switch",
|
||||
{
|
||||
"compareTo": "discriminator",
|
||||
"fields": {
|
||||
"0": "byte"
|
||||
},
|
||||
"default": "void"
|
||||
},
|
||||
] }
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue