Package net.minecraft.network.chat
Record Class SignedMessageHeader
java.lang.Object
java.lang.Record
net.minecraft.network.chat.SignedMessageHeader
public record SignedMessageHeader(@Nullable MessageSignature previousSignature, UUID sender)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MessageSignature
The field for thepreviousSignature
record component.private final UUID
The field for thesender
record component. -
Constructor Summary
ConstructorDescriptionSignedMessageHeader
(MessageSignature previousSignature, UUID sender) Creates an instance of aSignedMessageHeader
record class.SignedMessageHeader
(FriendlyByteBuf p_241381_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thepreviousSignature
record component.sender()
Returns the value of thesender
record component.final String
toString()
Returns a string representation of this record class.void
updateSignature
(SignatureUpdater.Output p_241383_, byte[] p_241564_) void
write
(FriendlyByteBuf p_241567_)
-
Field Details
-
previousSignature
The field for thepreviousSignature
record component. -
sender
The field for thesender
record component.
-
-
Constructor Details
-
SignedMessageHeader
-
SignedMessageHeader
Creates an instance of aSignedMessageHeader
record class.- Parameters:
previousSignature
- the value for thepreviousSignature
record componentsender
- the value for thesender
record component
-
-
Method Details
-
write
-
updateSignature
public void updateSignature(SignatureUpdater.Output p_241383_, byte[] p_241564_) throws SignatureException - Throws:
SignatureException
-
toString
Returns 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. -
hashCode
public 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. -
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)
. -
previousSignature
Returns the value of thepreviousSignature
record component.- Returns:
- the value of the
previousSignature
record component
-
sender
Returns the value of thesender
record component.- Returns:
- the value of the
sender
record component
-