Package net.minecraft.network.message
Record Class SignedMessage
java.lang.Object
java.lang.Record
net.minecraft.network.message.SignedMessage
- Record Components:
link
-signature
-signedBody
-unsignedContent
-filterMask
-
public record SignedMessage(MessageLink link, @Nullable MessageSignatureData signature, MessageBody signedBody, @Nullable Text unsignedContent, FilterMask filterMask)
extends Record
A signed message, consisting of the signature, the signed content,
the message body, the link to its preceding message, and the optional
unsigned content supplied when the message decorator modified the message.
Note that the signature itself might not be valid.
- Mappings:
Namespace Name named net/minecraft/network/message/SignedMessage
intermediary net/minecraft/class_7471
official yl
named link
intermediary comp_1083
official d
named signature
intermediary comp_1084
official e
named signedBody
intermediary comp_928
official f
named unsignedContent
intermediary comp_830
official g
named filterMask
intermediary comp_981
official h
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Duration
static final com.mojang.serialization.MapCodec
<SignedMessage> private final FilterMask
The field for thefilterMask
record component.private final MessageLink
The field for thelink
record component.private static final UUID
static final Duration
private final @Nullable MessageSignatureData
The field for thesignature
record component.private final MessageBody
The field for thesignedBody
record component.The field for theunsignedContent
record component. -
Constructor Summary
ConstructorDescriptionSignedMessage
(MessageLink messageLink, @Nullable MessageSignatureData messageSignatureData, MessageBody messageBody, @Nullable Text text, FilterMask filterMask) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canVerifyFrom
(UUID sender) Returns whether the message can be verified as fromsender
.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefilterMask
record component.long
getSalt()
final int
hashCode()
Returns a hash code value for this object.boolean
boolean
isExpiredOnClient
(Instant currentTime) boolean
isExpiredOnServer
(Instant currentTime) boolean
boolean
link()
Returns the value of thelink
record component.static SignedMessage
ofUnsigned
(String content) Returns a new signed message with empty signature.static SignedMessage
ofUnsigned
(UUID sender, String content) Returns a new signed message with given sender UUID and empty signature.Returns the value of thesignature
record component.Returns the value of thesignedBody
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunsignedContent
record component.static void
update
(SignatureUpdatable.SignatureUpdater updater, MessageLink link, MessageBody body) boolean
verify
(SignatureVerifier verifier) withFilterMask
(FilterMask filterMask) Returns the signed chat message withfilterMask
added.withFilterMaskEnabled
(boolean enabled) Returns this signed chat message ifenabled
istrue
, otherwise a new signed chat message without filtered parts.Returns the signed chat message withunsignedContent
removed if it exists.withUnsignedContent
(Text unsignedContent)
-
Field Details
-
link
The field for thelink
record component. -
signature
The field for thesignature
record component. -
signedBody
The field for thesignedBody
record component. -
unsignedContent
The field for theunsignedContent
record component. -
filterMask
The field for thefilterMask
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/network/message/SignedMessage;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_40846
Lnet/minecraft/class_7471;field_40846:Lcom/mojang/serialization/MapCodec;
official a
Lyl;a:Lcom/mojang/serialization/MapCodec;
-
NIL_UUID
- Mappings:
Namespace Name Mixin selector named NIL_UUID
Lnet/minecraft/network/message/SignedMessage;NIL_UUID:Ljava/util/UUID;
intermediary field_40688
Lnet/minecraft/class_7471;field_40688:Ljava/util/UUID;
official i
Lyl;i:Ljava/util/UUID;
-
SERVERBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector named SERVERBOUND_TIME_TO_LIVE
Lnet/minecraft/network/message/SignedMessage;SERVERBOUND_TIME_TO_LIVE:Ljava/time/Duration;
intermediary field_39786
Lnet/minecraft/class_7471;field_39786:Ljava/time/Duration;
official b
Lyl;b:Ljava/time/Duration;
-
CLIENTBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector named CLIENTBOUND_TIME_TO_LIVE
Lnet/minecraft/network/message/SignedMessage;CLIENTBOUND_TIME_TO_LIVE:Ljava/time/Duration;
intermediary field_39787
Lnet/minecraft/class_7471;field_39787:Ljava/time/Duration;
official c
Lyl;c:Ljava/time/Duration;
-
-
Constructor Details
-
SignedMessage
public SignedMessage(MessageLink messageLink, @Nullable @Nullable MessageSignatureData messageSignatureData, MessageBody messageBody, @Nullable @Nullable Text text, FilterMask filterMask)
-
-
Method Details
-
ofUnsigned
Returns a new signed message with empty signature.- Returns:
- a new signed message with empty signature
- Mappings:
Namespace Name Mixin selector named ofUnsigned
Lnet/minecraft/network/message/SignedMessage;ofUnsigned(Ljava/lang/String;)Lnet/minecraft/network/message/SignedMessage;
intermediary method_45041
Lnet/minecraft/class_7471;method_45041(Ljava/lang/String;)Lnet/minecraft/class_7471;
official a
Lyl;a(Ljava/lang/String;)Lyl;
-
ofUnsigned
Returns a new signed message with given sender UUID and empty signature.- Returns:
- a new signed message with given sender UUID and empty signature
- Mappings:
Namespace Name Mixin selector named ofUnsigned
Lnet/minecraft/network/message/SignedMessage;ofUnsigned(Ljava/util/UUID;Ljava/lang/String;)Lnet/minecraft/network/message/SignedMessage;
intermediary method_45098
Lnet/minecraft/class_7471;method_45098(Ljava/util/UUID;Ljava/lang/String;)Lnet/minecraft/class_7471;
official a
Lyl;a(Ljava/util/UUID;Ljava/lang/String;)Lyl;
-
withUnsignedContent
- Mappings:
Namespace Name Mixin selector named withUnsignedContent
Lnet/minecraft/network/message/SignedMessage;withUnsignedContent(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;
intermediary method_44863
Lnet/minecraft/class_7471;method_44863(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;
official a
Lyl;a(Lxv;)Lyl;
-
withoutUnsigned
Returns the signed chat message withunsignedContent
removed if it exists.- Returns:
- the signed chat message with
unsignedContent
removed if it exists - Implementation Note:
- This returns itself if the message does not have an unsigned content.
- Mappings:
Namespace Name Mixin selector named withoutUnsigned
Lnet/minecraft/network/message/SignedMessage;withoutUnsigned()Lnet/minecraft/network/message/SignedMessage;
intermediary method_44607
Lnet/minecraft/class_7471;method_44607()Lnet/minecraft/class_7471;
official a
Lyl;a()Lyl;
-
withFilterMask
Returns the signed chat message withfilterMask
added.- Returns:
- the signed chat message with
filterMask
added - Mappings:
Namespace Name Mixin selector named withFilterMask
Lnet/minecraft/network/message/SignedMessage;withFilterMask(Lnet/minecraft/network/message/FilterMask;)Lnet/minecraft/network/message/SignedMessage;
intermediary method_45097
Lnet/minecraft/class_7471;method_45097(Lnet/minecraft/class_7649;)Lnet/minecraft/class_7471;
official a
Lyl;a(Lxz;)Lyl;
-
withFilterMaskEnabled
Returns this signed chat message ifenabled
istrue
, otherwise a new signed chat message without filtered parts.- Returns:
- this signed chat message if
enabled
istrue
, otherwise a new signed chat message without filtered parts - Mappings:
Namespace Name Mixin selector named withFilterMaskEnabled
Lnet/minecraft/network/message/SignedMessage;withFilterMaskEnabled(Z)Lnet/minecraft/network/message/SignedMessage;
intermediary method_45099
Lnet/minecraft/class_7471;method_45099(Z)Lnet/minecraft/class_7471;
official a
Lyl;a(Z)Lyl;
-
stripSignature
- Mappings:
Namespace Name Mixin selector named stripSignature
Lnet/minecraft/network/message/SignedMessage;stripSignature()Lnet/minecraft/network/message/SignedMessage;
intermediary method_55625
Lnet/minecraft/class_7471;method_55625()Lnet/minecraft/class_7471;
official b
Lyl;b()Lyl;
-
update
public static void update(SignatureUpdatable.SignatureUpdater updater, MessageLink link, MessageBody body) throws SignatureException - Throws:
SignatureException
- Mappings:
Namespace Name Mixin selector named update
Lnet/minecraft/network/message/SignedMessage;update(Lnet/minecraft/network/encryption/SignatureUpdatable$SignatureUpdater;Lnet/minecraft/network/message/MessageLink;Lnet/minecraft/network/message/MessageBody;)V
intermediary method_46290
Lnet/minecraft/class_7471;method_46290(Lnet/minecraft/class_7498$class_7499;Lnet/minecraft/class_7826;Lnet/minecraft/class_7608;)V
official a
Lyl;a(Lbaq$a;Lyq;Lyo;)V
-
verify
- Mappings:
Namespace Name Mixin selector named verify
Lnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/encryption/SignatureVerifier;)Z
intermediary method_44858
Lnet/minecraft/class_7471;method_44858(Lnet/minecraft/class_7500;)Z
official a
Lyl;a(Lbar;)Z
-
getSignedContent
- Mappings:
Namespace Name Mixin selector named getSignedContent
Lnet/minecraft/network/message/SignedMessage;getSignedContent()Ljava/lang/String;
intermediary method_44862
Lnet/minecraft/class_7471;method_44862()Ljava/lang/String;
official c
Lyl;c()Ljava/lang/String;
-
getContent
- Mappings:
Namespace Name Mixin selector named getContent
Lnet/minecraft/network/message/SignedMessage;getContent()Lnet/minecraft/text/Text;
intermediary method_46291
Lnet/minecraft/class_7471;method_46291()Lnet/minecraft/class_2561;
official d
Lyl;d()Lxv;
-
getTimestamp
- Mappings:
Namespace Name Mixin selector named getTimestamp
Lnet/minecraft/network/message/SignedMessage;getTimestamp()Ljava/time/Instant;
intermediary method_44864
Lnet/minecraft/class_7471;method_44864()Ljava/time/Instant;
official e
Lyl;e()Ljava/time/Instant;
-
getSalt
public long getSalt()- Mappings:
Namespace Name Mixin selector named getSalt
Lnet/minecraft/network/message/SignedMessage;getSalt()J
intermediary method_44865
Lnet/minecraft/class_7471;method_44865()J
official f
Lyl;f()J
-
isExpiredOnServer
- Mappings:
Namespace Name Mixin selector named isExpiredOnServer
Lnet/minecraft/network/message/SignedMessage;isExpiredOnServer(Ljava/time/Instant;)Z
intermediary method_44747
Lnet/minecraft/class_7471;method_44747(Ljava/time/Instant;)Z
official a
Lyl;a(Ljava/time/Instant;)Z
-
isExpiredOnClient
- Mappings:
Namespace Name Mixin selector named isExpiredOnClient
Lnet/minecraft/network/message/SignedMessage;isExpiredOnClient(Ljava/time/Instant;)Z
intermediary method_44748
Lnet/minecraft/class_7471;method_44748(Ljava/time/Instant;)Z
official b
Lyl;b(Ljava/time/Instant;)Z
-
getSender
- Mappings:
Namespace Name Mixin selector named getSender
Lnet/minecraft/network/message/SignedMessage;getSender()Ljava/util/UUID;
intermediary method_46292
Lnet/minecraft/class_7471;method_46292()Ljava/util/UUID;
official g
Lyl;g()Ljava/util/UUID;
-
isSenderMissing
public boolean isSenderMissing()- Mappings:
Namespace Name Mixin selector named isSenderMissing
Lnet/minecraft/network/message/SignedMessage;isSenderMissing()Z
intermediary method_46293
Lnet/minecraft/class_7471;method_46293()Z
official h
Lyl;h()Z
-
hasSignature
public boolean hasSignature()- Mappings:
Namespace Name Mixin selector named hasSignature
Lnet/minecraft/network/message/SignedMessage;hasSignature()Z
intermediary method_46294
Lnet/minecraft/class_7471;method_46294()Z
official i
Lyl;i()Z
-
canVerifyFrom
Returns whether the message can be verified as fromsender
.This does not actually verify that the message is, in fact, from
sender
. Rather, this returns whether it's possible to verify thatsender
sent this message.- Returns:
- whether the message can be verified as from
sender
- Mappings:
Namespace Name Mixin selector named canVerifyFrom
Lnet/minecraft/network/message/SignedMessage;canVerifyFrom(Ljava/util/UUID;)Z
intermediary method_45040
Lnet/minecraft/class_7471;method_45040(Ljava/util/UUID;)Z
official a
Lyl;a(Ljava/util/UUID;)Z
-
isFullyFiltered
public boolean isFullyFiltered()- Mappings:
Namespace Name Mixin selector named isFullyFiltered
Lnet/minecraft/network/message/SignedMessage;isFullyFiltered()Z
intermediary method_45100
Lnet/minecraft/class_7471;method_45100()Z
official j
Lyl;j()Z
-
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)
. -
link
Returns the value of thelink
record component.- Returns:
- the value of the
link
record component
-
signature
Returns the value of thesignature
record component.- Returns:
- the value of the
signature
record component
-
signedBody
Returns the value of thesignedBody
record component.- Returns:
- the value of the
signedBody
record component
-
unsignedContent
Returns the value of theunsignedContent
record component.- Returns:
- the value of the
unsignedContent
record component
-
filterMask
Returns the value of thefilterMask
record component.- Returns:
- the value of the
filterMask
record component
-