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 String
private final boolean
static final StreamCodec
<FriendlyByteBuf, ClientboundHelloPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundHelloPacket
(String pServerId, byte[] pPublicKey, byte[] pChallenge, boolean pShouldAuthenticate) private
ClientboundHelloPacket
(FriendlyByteBuf p_179816_) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
void
handle
(ClientLoginPacketListener pHandler) Passes this Packet on to the NetHandler for processing.boolean
type()
private void
write
(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, wait
Methods 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:
type
in interfacePacket<ClientLoginPacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ClientLoginPacketListener>
-
getServerId
-
getPublicKey
- Throws:
CryptException
-
getChallenge
public byte[] getChallenge() -
shouldAuthenticate
public boolean shouldAuthenticate()
-