Update packetid name

This commit is contained in:
Tnze
2021-12-09 20:24:39 +08:00
parent 805ca37a67
commit 0cc5695aa3
15 changed files with 203 additions and 474 deletions

View File

@ -89,7 +89,7 @@ func encryptionRequest(conn *net.Conn, publicKey []byte) ([]byte, error) {
return nil, err
}
err = conn.WritePacket(pk.Marshal(
packetid.EncryptionBeginClientbound,
packetid.LoginEncryptionRequest,
pk.String(""),
pk.ByteArray(publicKey),
pk.ByteArray(verifyToken[:]),
@ -103,7 +103,7 @@ func encryptionResponse(conn *net.Conn) ([]byte, []byte, error) {
if err != nil {
return nil, nil, err
}
if p.ID != packetid.EncryptionBeginServerbound {
if p.ID != packetid.LoginEncryptionResponse {
return nil, nil, fmt.Errorf("0x%02X is not Encryption Response", p.ID)
}