Register client plugin channels on FML|HS ServerHello

This may not be strictly necessary, in either case Forge server with
-Dfml.debugNetworkHandshake=true logs:
[14:26:03] [Netty Server IO #3/INFO] [FML]: Client protocol version 2
This commit is contained in:
deathcap 2016-01-23 14:26:11 -08:00
parent e9159a432b
commit 2787adbad3

View file

@ -117,6 +117,11 @@ client.on('custom_payload', function(packet) {
// TODO: support higher protocols, if they change // TODO: support higher protocols, if they change
} }
client.write('custom_payload', {
channel: 'REGISTER',
data: new Buffer(['FML|HS', 'FML', 'FML|MP', 'FML', 'FORGE'].join('\0'))
});
var clientHello = proto.createPacketBuffer('FML|HS', { var clientHello = proto.createPacketBuffer('FML|HS', {
discriminator: 1, // ClientHello discriminator: 1, // ClientHello
fmlProtocolVersionClient: parsed.data.fmlProtocolVersionServer fmlProtocolVersionClient: parsed.data.fmlProtocolVersionServer