Record Class ResolvableProfile
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.ResolvableProfile
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ResolvableProfile> private static final com.mojang.serialization.Codec<ResolvableProfile> private final com.mojang.authlib.GameProfileThe field for thegameProfilerecord component.The field for theidrecord component.The field for thenamerecord component.private final com.mojang.authlib.properties.PropertyMapThe field for thepropertiesrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ResolvableProfile> -
Constructor Summary
ConstructorsConstructorDescriptionResolvableProfile(com.mojang.authlib.GameProfile p_332009_) ResolvableProfile(Optional<String> p_330853_, Optional<UUID> p_332668_, com.mojang.authlib.properties.PropertyMap p_331206_) ResolvableProfile(Optional<String> name, Optional<UUID> id, com.mojang.authlib.properties.PropertyMap properties, com.mojang.authlib.GameProfile gameProfile) Creates an instance of aResolvableProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.authlib.GameProfilecreateProfile(Optional<String> p_331092_, Optional<UUID> p_332678_, com.mojang.authlib.properties.PropertyMap p_331544_) final booleanIndicates whether some other object is "equal to" this one.com.mojang.authlib.GameProfileReturns the value of thegameProfilerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanname()Returns the value of thenamerecord component.com.mojang.authlib.properties.PropertyMapReturns the value of thepropertiesrecord component.resolve()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
name
The field for thenamerecord component. -
id
The field for theidrecord component. -
properties
private final com.mojang.authlib.properties.PropertyMap propertiesThe field for thepropertiesrecord component. -
gameProfile
private final com.mojang.authlib.GameProfile gameProfileThe field for thegameProfilerecord component. -
FULL_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
ResolvableProfile
-
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 aResolvableProfilerecord class.- Parameters:
name- the value for thenamerecord componentid- the value for theidrecord componentproperties- the value for thepropertiesrecord componentgameProfile- the value for thegameProfilerecord component
-
-
Method Details
-
resolve
-
createProfile
-
isResolved
public boolean isResolved() -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
properties
public com.mojang.authlib.properties.PropertyMap properties()Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-
gameProfile
public com.mojang.authlib.GameProfile gameProfile()Returns the value of thegameProfilerecord component.- Returns:
- the value of the
gameProfilerecord component
-