mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 13:14:41 -04:00
Decode fmlProtocolVersion in ServerHello
This commit is contained in:
parent
8018de5c29
commit
09b4dc8358
@ -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…
x
Reference in New Issue
Block a user