Record Class ServerboundHelloPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.login.ServerboundHelloPacket
- All Implemented Interfaces:
Packet<ServerLoginPacketListener>
public record ServerboundHelloPacket(String name, UUID profileId)
extends Record
implements Packet<ServerLoginPacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thenamerecord component.private final UUIDThe field for theprofileIdrecord component.static final StreamCodec<FriendlyByteBuf, ServerboundHelloPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionServerboundHelloPacket(String name, UUID profileId) Creates an instance of aServerboundHelloPacketrecord class.private -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerLoginPacketListener listener) Passes this Packet on to the NetHandler for processing.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of theprofileIdrecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf output) Writes the raw packet data to the data stream.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
name
The field for thenamerecord component. -
profileId
The field for theprofileIdrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ServerboundHelloPacket
-
ServerboundHelloPacket
-
-
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>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
profileId
Returns the value of theprofileIdrecord component.- Returns:
- the value of the
profileIdrecord component
-