Decode fmlProtocolVersion in ServerHello

This commit is contained in:
deathcap 2016-01-23 14:00:59 -08:00
parent 8018de5c29
commit 09b4dc8358

View file

@ -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"
},
] }
]
]);