implement multiplayer direct connect, implement network manager, implement handshake and login packets, implement ByteBuf, implement RSA and AES encryption, bump version to 1.1.0

This commit is contained in:
LabyStudio
2022-06-17 06:34:09 +02:00
parent 22872f55d6
commit 410346427f
35 changed files with 2513 additions and 10 deletions
@@ -0,0 +1,21 @@
export default class ProtocolState {
static HANDSHAKE = -1;
static PLAY = 0;
static STATUS = 1;
static LOGIN = 2;
static getName(state) {
switch (state) {
case ProtocolState.HANDSHAKE:
return "HANDSHAKE";
case ProtocolState.LOGIN:
return "LOGIN";
case ProtocolState.PLAY:
return "PLAY";
case ProtocolState.STATUS:
return "STATUS";
default:
return "UNKNOWN";
}
}
}