Record Class ResolvableProfile

java.lang.Object
java.lang.Record
net.minecraft.world.item.component.ResolvableProfile

public record ResolvableProfile(Optional<String> name, Optional<UUID> id, com.mojang.authlib.properties.PropertyMap properties, com.mojang.authlib.GameProfile gameProfile) extends Record
  • Field Details

    • name

      private final Optional<String> name
      The field for the name record component.
    • id

      private final Optional<UUID> id
      The field for the id record component.
    • properties

      private final com.mojang.authlib.properties.PropertyMap properties
      The field for the properties record component.
    • gameProfile

      private final com.mojang.authlib.GameProfile gameProfile
      The field for the gameProfile record component.
    • FULL_CODEC

      private static final com.mojang.serialization.Codec<ResolvableProfile> FULL_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<ResolvableProfile> CODEC
    • STREAM_CODEC

      public static final StreamCodec<io.netty.buffer.ByteBuf,ResolvableProfile> STREAM_CODEC
  • Constructor Details

    • ResolvableProfile

      public ResolvableProfile(Optional<String> p_330853_, Optional<UUID> p_332668_, com.mojang.authlib.properties.PropertyMap p_331206_)
    • ResolvableProfile

      public ResolvableProfile(com.mojang.authlib.GameProfile p_332009_)
    • ResolvableProfile

      public ResolvableProfile(Optional<String> name, Optional<UUID> id, com.mojang.authlib.properties.PropertyMap properties, com.mojang.authlib.GameProfile gameProfile)
      Creates an instance of a ResolvableProfile record class.
      Parameters:
      name - the value for the name record component
      id - the value for the id record component
      properties - the value for the properties record component
      gameProfile - the value for the gameProfile record component
  • Method Details

    • resolve

    • createProfile

      private static com.mojang.authlib.GameProfile createProfile(Optional<String> p_331092_, Optional<UUID> p_332678_, com.mojang.authlib.properties.PropertyMap p_331544_)
    • isResolved

      public boolean isResolved()
    • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public Optional<String> name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • id

      public Optional<UUID> id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • properties

      public com.mojang.authlib.properties.PropertyMap properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component
    • gameProfile

      public com.mojang.authlib.GameProfile gameProfile()
      Returns the value of the gameProfile record component.
      Returns:
      the value of the gameProfile record component