Record Class MessageSourceProfile

java.lang.Object
java.lang.Record
net.minecraft.network.message.MessageSourceProfile
Record Components:
profileId -
playerPublicKey -

public record MessageSourceProfile(UUID profileId, @Nullable PlayerPublicKey playerPublicKey) extends Record
A pair of the profile ID and public key of the message's source.

An instance can be obtained via Entity.getMessageSourceProfile().

Mappings:
Namespace Name
official rl
intermediary net/minecraft/class_7436
named net/minecraft/network/message/MessageSourceProfile
official b
intermediary comp_756
named profileId
official c
intermediary comp_918
named playerPublicKey
  • Field Details

    • profileId

      private final UUID profileId
      The field for the profileId record component.
    • playerPublicKey

      @Nullable private final @Nullable PlayerPublicKey playerPublicKey
      The field for the playerPublicKey record component.
    • NONE

      public static final MessageSourceProfile NONE
      Mappings:
      Namespace Name Mixin selector
      official a Lrl;a:Lrl;
      intermediary field_39810 Lnet/minecraft/class_7436;field_39810:Lnet/minecraft/class_7436;
      named NONE Lnet/minecraft/network/message/MessageSourceProfile;NONE:Lnet/minecraft/network/message/MessageSourceProfile;
  • Constructor Details

  • Method Details

    • lacksProfileId

      public boolean lacksProfileId()
      Returns true if this source profile does not have the profile ID set.

      Commands executed from server console or command block use such source profile.

      Returns:
      true if this source profile does not have the profile ID set
      Mappings:
      Namespace Name Mixin selector
      official a Lrl;a()Z
      intermediary method_44831 Lnet/minecraft/class_7436;method_44831()Z
      named lacksProfileId Lnet/minecraft/network/message/MessageSourceProfile;lacksProfileId()Z
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • profileId

      public UUID profileId()
      Returns the value of the profileId record component.
      Returns:
      the value of the profileId record component
    • playerPublicKey

      @Nullable public @Nullable PlayerPublicKey playerPublicKey()
      Returns the value of the playerPublicKey record component.
      Returns:
      the value of the playerPublicKey record component