Class ClientboundHelloPacket
java.lang.Object
net.minecraft.network.protocol.login.ClientboundHelloPacket
- All Implemented Interfaces:
Packet<ClientLoginPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final byte[]private final Stringprivate final booleanstatic final StreamCodec<FriendlyByteBuf, ClientboundHelloPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundHelloPacket(String pServerId, byte[] pPublicKey, byte[] pChallenge, boolean pShouldAuthenticate) privateClientboundHelloPacket(FriendlyByteBuf p_179816_) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]voidhandle(ClientLoginPacketListener pHandler) Passes this Packet on to the NetHandler for processing.booleantype()private voidwrite(FriendlyByteBuf p_134793_) 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
-
serverId
-
publicKey
private final byte[] publicKey -
challenge
private final byte[] challenge -
shouldAuthenticate
private final boolean shouldAuthenticate
-
-
Constructor Details
-
ClientboundHelloPacket
public ClientboundHelloPacket(String pServerId, byte[] pPublicKey, byte[] pChallenge, boolean pShouldAuthenticate) -
ClientboundHelloPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
type
- Specified by:
typein interfacePacket<ClientLoginPacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientLoginPacketListener>
-
getServerId
-
getPublicKey
- Throws:
CryptException
-
getChallenge
public byte[] getChallenge() -
shouldAuthenticate
public boolean shouldAuthenticate()
-