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) privateServerboundKeyPacket(FriendlyByteBuf buffer) -
Method Summary
Modifier and TypeMethodDescriptiongetSecretKey(PrivateKey key) voidhandle(ServerLoginPacketListener handler) Passes this Packet on to the NetHandler for processing.booleanisChallengeValid(byte[] expected, PrivateKey key) type()private voidwrite(FriendlyByteBuf buffer) Writes the raw packet data to the data stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.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
-