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 pSecretKey, PublicKey pPublicKey, byte[] pChallenge) privateServerboundKeyPacket(FriendlyByteBuf p_179829_) -
Method Summary
Modifier and TypeMethodDescriptiongetSecretKey(PrivateKey pKey) voidhandle(ServerLoginPacketListener pHandler) Passes this Packet on to the NetHandler for processing.booleanisChallengeValid(byte[] pExpected, PrivateKey pKey) type()private voidwrite(FriendlyByteBuf p_134870_) 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 pSecretKey, PublicKey pPublicKey, byte[] pChallenge) 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
-