Record Class ServerboundHelloPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.login.ServerboundHelloPacket
- All Implemented Interfaces:
- Packet<ServerLoginPacketListener>
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionServerboundHelloPacket(String name, Optional<UUID> profileId) Creates an instance of aServerboundHelloPacketrecord class.ServerboundHelloPacket(FriendlyByteBuf p_179827_) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerLoginPacketListener p_134848_) 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.voidwrite(FriendlyByteBuf p_134851_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable
- 
Field Details- 
nameThe field for thenamerecord component.
- 
profileIdThe field for theprofileIdrecord component.
 
- 
- 
Constructor Details- 
ServerboundHelloPacket
- 
ServerboundHelloPacketCreates an instance of aServerboundHelloPacketrecord class.- Parameters:
- name- the value for the- namerecord component
- profileId- the value for the- profileIdrecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ServerLoginPacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ServerLoginPacketListener>
 
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates 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).
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
- 
profileIdReturns the value of theprofileIdrecord component.- Returns:
- the value of the profileIdrecord component
 
 
-