mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-12-04 21:11:04 -05:00
Use symbolic values for writeAck() phase
This commit is contained in:
parent
6c33ec2856
commit
0b45b439bc
1 changed files with 4 additions and 4 deletions
|
@ -248,7 +248,7 @@ function fmlHandshakeStep(client, data)
|
||||||
channel: 'FML|HS',
|
channel: 'FML|HS',
|
||||||
data: modList
|
data: modList
|
||||||
});
|
});
|
||||||
writeAck(client, 2); // WAITINGSERVERDATA
|
writeAck(client, FMLHandshakeClientState.WAITINGSERVERDATA);
|
||||||
client.fmlHandshakeState = FMLHandshakeClientState.WAITINGSERVERDATA;
|
client.fmlHandshakeState = FMLHandshakeClientState.WAITINGSERVERDATA;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ function fmlHandshakeStep(client, data)
|
||||||
if (parsed.data.hasMore === false) {
|
if (parsed.data.hasMore === false) {
|
||||||
console.log('LAST RegistryData');
|
console.log('LAST RegistryData');
|
||||||
|
|
||||||
writeAck(client, 3); // WAITINGSERVERCOMPLETE
|
writeAck(client, FMLHandshakeClientState.WAITINGSERVERCOMPLETE);
|
||||||
client.fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
client.fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -280,7 +280,7 @@ function fmlHandshakeStep(client, data)
|
||||||
{
|
{
|
||||||
assert.ok(parsed.data.discriminator === 'HandshakeAck', `expected HandshakeAck in PENDINGCOMPLETE, got ${parsed.data.discrimnator}`);
|
assert.ok(parsed.data.discriminator === 'HandshakeAck', `expected HandshakeAck in PENDINGCOMPLETE, got ${parsed.data.discrimnator}`);
|
||||||
assert.ok(parsed.data.phase === 2, `expected HandshakeAck phase WAITINGACK, got ${parsed.data.phase}`);
|
assert.ok(parsed.data.phase === 2, `expected HandshakeAck phase WAITINGACK, got ${parsed.data.phase}`);
|
||||||
writeAck(client, 4); // PENDINGCOMPLETE
|
writeAck(client, FMLHandshakeClientState.PENDINGCOMPLETE4);
|
||||||
client.fmlHandshakeState = FMLHandshakeClientState.COMPLETE
|
client.fmlHandshakeState = FMLHandshakeClientState.COMPLETE
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ function fmlHandshakeStep(client, data)
|
||||||
{
|
{
|
||||||
assert.ok(parsed.data.phase === 3, `expected HandshakeAck phase COMPLETE, got ${parsed.data.phase}`);
|
assert.ok(parsed.data.phase === 3, `expected HandshakeAck phase COMPLETE, got ${parsed.data.phase}`);
|
||||||
|
|
||||||
writeAck(client, 5); // COMPLETE
|
writeAck(client, FMLHandshakeClientState.COMPLETE);
|
||||||
console.log('HandshakeAck Complete!');
|
console.log('HandshakeAck Complete!');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue