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/SignedMessageintermediary net/minecraft/class_7471official xpnamed linkintermediary comp_1083official dnamed signatureintermediary comp_1084official enamed signedBodyintermediary comp_928official fnamed unsignedContentintermediary comp_830official gnamed filterMaskintermediary comp_981official h
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Durationstatic final com.mojang.serialization.MapCodec<SignedMessage> private final FilterMaskThe field for thefilterMaskrecord component.private final MessageLinkThe field for thelinkrecord component.private static final UUIDstatic final Durationprivate final @Nullable MessageSignatureDataThe field for thesignaturerecord component.private final MessageBodyThe field for thesignedBodyrecord component.The field for theunsignedContentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignedMessage(MessageLink messageLink, @Nullable MessageSignatureData messageSignatureData, MessageBody messageBody, @Nullable Text text, FilterMask filterMask) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanVerifyFrom(UUID sender) Returns whether the message can be verified as fromsender.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefilterMaskrecord component.longgetSalt()final inthashCode()Returns a hash code value for this object.booleanbooleanisExpiredOnClient(Instant currentTime) booleanisExpiredOnServer(Instant currentTime) booleanbooleanlink()Returns the value of thelinkrecord component.static SignedMessageofUnsigned(String content) Returns a new signed message with empty signature.static SignedMessageofUnsigned(UUID sender, String content) Returns a new signed message with given sender UUID and empty signature.Returns the value of thesignaturerecord component.Returns the value of thesignedBodyrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsignedContentrecord component.static voidupdate(SignatureUpdatable.SignatureUpdater updater, MessageLink link, MessageBody body) booleanverify(SignatureVerifier verifier) withFilterMask(FilterMask filterMask) Returns the signed chat message withfilterMaskadded.withFilterMaskEnabled(boolean enabled) Returns this signed chat message ifenabledistrue, otherwise a new signed chat message without filtered parts.Returns the signed chat message withunsignedContentremoved if it exists.withUnsignedContent(Text unsignedContent)
-
Field Details
-
link
The field for thelinkrecord component. -
signature
The field for thesignaturerecord component. -
signedBody
The field for thesignedBodyrecord component. -
unsignedContent
The field for theunsignedContentrecord component. -
filterMask
The field for thefilterMaskrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/network/message/SignedMessage;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_40846Lnet/minecraft/class_7471;field_40846:Lcom/mojang/serialization/MapCodec;official aLxp;a:Lcom/mojang/serialization/MapCodec;
-
NIL_UUID
- Mappings:
Namespace Name Mixin selector named NIL_UUIDLnet/minecraft/network/message/SignedMessage;NIL_UUID:Ljava/util/UUID;intermediary field_40688Lnet/minecraft/class_7471;field_40688:Ljava/util/UUID;official iLxp;i:Ljava/util/UUID;
-
SERVERBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector named SERVERBOUND_TIME_TO_LIVELnet/minecraft/network/message/SignedMessage;SERVERBOUND_TIME_TO_LIVE:Ljava/time/Duration;intermediary field_39786Lnet/minecraft/class_7471;field_39786:Ljava/time/Duration;official bLxp;b:Ljava/time/Duration;
-
CLIENTBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector named CLIENTBOUND_TIME_TO_LIVELnet/minecraft/network/message/SignedMessage;CLIENTBOUND_TIME_TO_LIVE:Ljava/time/Duration;intermediary field_39787Lnet/minecraft/class_7471;field_39787:Ljava/time/Duration;official cLxp;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 ofUnsignedLnet/minecraft/network/message/SignedMessage;ofUnsigned(Ljava/lang/String;)Lnet/minecraft/network/message/SignedMessage;intermediary method_45041Lnet/minecraft/class_7471;method_45041(Ljava/lang/String;)Lnet/minecraft/class_7471;official aLxp;a(Ljava/lang/String;)Lxp;
-
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 ofUnsignedLnet/minecraft/network/message/SignedMessage;ofUnsigned(Ljava/util/UUID;Ljava/lang/String;)Lnet/minecraft/network/message/SignedMessage;intermediary method_45098Lnet/minecraft/class_7471;method_45098(Ljava/util/UUID;Ljava/lang/String;)Lnet/minecraft/class_7471;official aLxp;a(Ljava/util/UUID;Ljava/lang/String;)Lxp;
-
withUnsignedContent
- Mappings:
Namespace Name Mixin selector named withUnsignedContentLnet/minecraft/network/message/SignedMessage;withUnsignedContent(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;intermediary method_44863Lnet/minecraft/class_7471;method_44863(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;official aLxp;a(Lwz;)Lxp;
-
withoutUnsigned
Returns the signed chat message withunsignedContentremoved if it exists.- Returns:
- the signed chat message with
unsignedContentremoved if it exists - Implementation Note:
- This returns itself if the message does not have an unsigned content.
- Mappings:
Namespace Name Mixin selector named withoutUnsignedLnet/minecraft/network/message/SignedMessage;withoutUnsigned()Lnet/minecraft/network/message/SignedMessage;intermediary method_44607Lnet/minecraft/class_7471;method_44607()Lnet/minecraft/class_7471;official aLxp;a()Lxp;
-
withFilterMask
Returns the signed chat message withfilterMaskadded.- Returns:
- the signed chat message with
filterMaskadded - Mappings:
Namespace Name Mixin selector named withFilterMaskLnet/minecraft/network/message/SignedMessage;withFilterMask(Lnet/minecraft/network/message/FilterMask;)Lnet/minecraft/network/message/SignedMessage;intermediary method_45097Lnet/minecraft/class_7471;method_45097(Lnet/minecraft/class_7649;)Lnet/minecraft/class_7471;official aLxp;a(Lxd;)Lxp;
-
withFilterMaskEnabled
Returns this signed chat message ifenabledistrue, otherwise a new signed chat message without filtered parts.- Returns:
- this signed chat message if
enabledistrue, otherwise a new signed chat message without filtered parts - Mappings:
Namespace Name Mixin selector named withFilterMaskEnabledLnet/minecraft/network/message/SignedMessage;withFilterMaskEnabled(Z)Lnet/minecraft/network/message/SignedMessage;intermediary method_45099Lnet/minecraft/class_7471;method_45099(Z)Lnet/minecraft/class_7471;official aLxp;a(Z)Lxp;
-
stripSignature
- Mappings:
Namespace Name Mixin selector named stripSignatureLnet/minecraft/network/message/SignedMessage;stripSignature()Lnet/minecraft/network/message/SignedMessage;intermediary method_55625Lnet/minecraft/class_7471;method_55625()Lnet/minecraft/class_7471;official bLxp;b()Lxp;
-
update
public static void update(SignatureUpdatable.SignatureUpdater updater, MessageLink link, MessageBody body) throws SignatureException - Throws:
SignatureException- Mappings:
Namespace Name Mixin selector named updateLnet/minecraft/network/message/SignedMessage;update(Lnet/minecraft/network/encryption/SignatureUpdatable$SignatureUpdater;Lnet/minecraft/network/message/MessageLink;Lnet/minecraft/network/message/MessageBody;)Vintermediary method_46290Lnet/minecraft/class_7471;method_46290(Lnet/minecraft/class_7498$class_7499;Lnet/minecraft/class_7826;Lnet/minecraft/class_7608;)Vofficial aLxp;a(Laza$a;Lxu;Lxs;)V
-
verify
- Mappings:
Namespace Name Mixin selector named verifyLnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/encryption/SignatureVerifier;)Zintermediary method_44858Lnet/minecraft/class_7471;method_44858(Lnet/minecraft/class_7500;)Zofficial aLxp;a(Lazb;)Z
-
getSignedContent
- Mappings:
Namespace Name Mixin selector named getSignedContentLnet/minecraft/network/message/SignedMessage;getSignedContent()Ljava/lang/String;intermediary method_44862Lnet/minecraft/class_7471;method_44862()Ljava/lang/String;official cLxp;c()Ljava/lang/String;
-
getContent
- Mappings:
Namespace Name Mixin selector named getContentLnet/minecraft/network/message/SignedMessage;getContent()Lnet/minecraft/text/Text;intermediary method_46291Lnet/minecraft/class_7471;method_46291()Lnet/minecraft/class_2561;official dLxp;d()Lwz;
-
getTimestamp
- Mappings:
Namespace Name Mixin selector named getTimestampLnet/minecraft/network/message/SignedMessage;getTimestamp()Ljava/time/Instant;intermediary method_44864Lnet/minecraft/class_7471;method_44864()Ljava/time/Instant;official eLxp;e()Ljava/time/Instant;
-
getSalt
public long getSalt()- Mappings:
Namespace Name Mixin selector named getSaltLnet/minecraft/network/message/SignedMessage;getSalt()Jintermediary method_44865Lnet/minecraft/class_7471;method_44865()Jofficial fLxp;f()J
-
isExpiredOnServer
- Mappings:
Namespace Name Mixin selector named isExpiredOnServerLnet/minecraft/network/message/SignedMessage;isExpiredOnServer(Ljava/time/Instant;)Zintermediary method_44747Lnet/minecraft/class_7471;method_44747(Ljava/time/Instant;)Zofficial aLxp;a(Ljava/time/Instant;)Z
-
isExpiredOnClient
- Mappings:
Namespace Name Mixin selector named isExpiredOnClientLnet/minecraft/network/message/SignedMessage;isExpiredOnClient(Ljava/time/Instant;)Zintermediary method_44748Lnet/minecraft/class_7471;method_44748(Ljava/time/Instant;)Zofficial bLxp;b(Ljava/time/Instant;)Z
-
getSender
- Mappings:
Namespace Name Mixin selector named getSenderLnet/minecraft/network/message/SignedMessage;getSender()Ljava/util/UUID;intermediary method_46292Lnet/minecraft/class_7471;method_46292()Ljava/util/UUID;official gLxp;g()Ljava/util/UUID;
-
isSenderMissing
public boolean isSenderMissing()- Mappings:
Namespace Name Mixin selector named isSenderMissingLnet/minecraft/network/message/SignedMessage;isSenderMissing()Zintermediary method_46293Lnet/minecraft/class_7471;method_46293()Zofficial hLxp;h()Z
-
hasSignature
public boolean hasSignature()- Mappings:
Namespace Name Mixin selector named hasSignatureLnet/minecraft/network/message/SignedMessage;hasSignature()Zintermediary method_46294Lnet/minecraft/class_7471;method_46294()Zofficial iLxp;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 thatsendersent this message.- Returns:
- whether the message can be verified as from
sender - Mappings:
Namespace Name Mixin selector named canVerifyFromLnet/minecraft/network/message/SignedMessage;canVerifyFrom(Ljava/util/UUID;)Zintermediary method_45040Lnet/minecraft/class_7471;method_45040(Ljava/util/UUID;)Zofficial aLxp;a(Ljava/util/UUID;)Z
-
isFullyFiltered
public boolean isFullyFiltered()- Mappings:
Namespace Name Mixin selector named isFullyFilteredLnet/minecraft/network/message/SignedMessage;isFullyFiltered()Zintermediary method_45100Lnet/minecraft/class_7471;method_45100()Zofficial jLxp;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 thelinkrecord component.- Returns:
- the value of the
linkrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord component
-
signedBody
Returns the value of thesignedBodyrecord component.- Returns:
- the value of the
signedBodyrecord component
-
unsignedContent
Returns the value of theunsignedContentrecord component.- Returns:
- the value of the
unsignedContentrecord component
-
filterMask
Returns the value of thefilterMaskrecord component.- Returns:
- the value of the
filterMaskrecord component
-