mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-29 06:03:33 -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();
|
var proto = new ProtoDef();
|
||||||
// http://wiki.vg/User:Pokechu22/Forge#FML.7CHS_Packet_structure
|
// http://wiki.vg/Minecraft_Forge_Handshake
|
||||||
proto.addType('FML|HS', [
|
proto.addType('FML|HS', [
|
||||||
'container',
|
'container',
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "discriminator",
|
"name": "discriminator",
|
||||||
"type": "byte"
|
"type": "byte"
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
// ServerHello
|
||||||
|
"name": "fmlProtocolVersion",
|
||||||
|
"type": [
|
||||||
|
"switch",
|
||||||
|
{
|
||||||
|
"compareTo": "discriminator",
|
||||||
|
"fields": {
|
||||||
|
"0": "byte"
|
||||||
|
},
|
||||||
|
"default": "void"
|
||||||
|
},
|
||||||
|
] }
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user