fmlProtocolVersion client/server no longer collide

This commit is contained in:
deathcap 2016-01-23 17:03:13 -08:00
parent b9bc0e1cb8
commit 6a6bdff5c8

View file

@ -79,7 +79,7 @@ proto.addType('FML|HS',
"container",
[
{
"name": "fmlProtocolVersionServer",
"name": "fmlProtocolVersion",
"type": "byte"
},
{
@ -89,7 +89,7 @@ proto.addType('FML|HS',
"switch",
{
// "Only sent if protocol version is greater than 1."
"compareTo": "fmlProtocolVersionServer",
"compareTo": "fmlProtocolVersion",
"fields":
{
"0": "void",
@ -107,7 +107,7 @@ proto.addType('FML|HS',
"container",
[
{
"name": "fmlProtocolVersionClient",
"name": "fmlProtocolVersion",
"type": "byte"
}
]
@ -207,7 +207,7 @@ client.on('custom_payload', function(packet) {
if (parsed.data.discriminator === 'ServerHello') {
if (parsed.data.fmlProtocolVersionServer > 2) {
if (parsed.data.fmlProtocolVersion > 2) {
// TODO: support higher protocols, if they change
}
@ -218,7 +218,7 @@ client.on('custom_payload', function(packet) {
var clientHello = proto.createPacketBuffer('FML|HS', {
discriminator: 'ClientHello',
fmlProtocolVersionClient: parsed.data.fmlProtocolVersionServer
fmlProtocolVersion: parsed.data.fmlProtocolVersion
});
client.write('custom_payload', {