Class ServerboundKeyPacket
java.lang.Object
net.minecraft.network.protocol.login.ServerboundKeyPacket
- All Implemented Interfaces:
Packet<ServerLoginPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final byte[]static final StreamCodec<FriendlyByteBuf, ServerboundKeyPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionServerboundKeyPacket(SecretKey secretKey, PublicKey publicKey, byte[] challenge) private -
Method Summary
Modifier and TypeMethodDescriptiongetSecretKey(PrivateKey privateKey) voidhandle(ServerLoginPacketListener listener) Passes this Packet on to the NetHandler for processing.booleanisChallengeValid(byte[] challenge, PrivateKey privateKey) type()private voidwrite(FriendlyByteBuf output) Writes the raw packet data to the data stream.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
keybytes
private final byte[] keybytes -
encryptedChallenge
private final byte[] encryptedChallenge
-
-
Constructor Details
-
ServerboundKeyPacket
public ServerboundKeyPacket(SecretKey secretKey, PublicKey publicKey, byte[] challenge) throws CryptException - Throws:
CryptException
-
ServerboundKeyPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
type
- Specified by:
typein interfacePacket<ServerLoginPacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ServerLoginPacketListener>
-
getSecretKey
- Throws:
CryptException
-
isChallengeValid
-