Record Class AtlasSprite
java.lang.Object
java.lang.Record
net.minecraft.network.chat.contents.objects.AtlasSprite
- All Implemented Interfaces:
ObjectInfo
public record AtlasSprite(ResourceLocation atlas, ResourceLocation sprite)
extends Record
implements ObjectInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceLocationThe field for theatlasrecord component.static final ResourceLocationstatic final com.mojang.serialization.MapCodec<AtlasSprite> private final ResourceLocationThe field for thespriterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAtlasSprite(ResourceLocation atlas, ResourceLocation sprite) Creates an instance of aAtlasSpriterecord class. -
Method Summary
Modifier and TypeMethodDescriptionatlas()Returns the value of theatlasrecord component.com.mojang.serialization.MapCodec<AtlasSprite> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sprite()Returns the value of thespriterecord component.private static StringtoShortName(ResourceLocation pLocation) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
atlas
The field for theatlasrecord component. -
sprite
The field for thespriterecord component. -
DEFAULT_ATLAS
-
MAP_CODEC
-
-
Constructor Details
-
AtlasSprite
Creates an instance of aAtlasSpriterecord class.- Parameters:
atlas- the value for theatlasrecord componentsprite- the value for thespriterecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceObjectInfo
-
fontDescription
- Specified by:
fontDescriptionin interfaceObjectInfo
-
toShortName
-
description
- Specified by:
descriptionin interfaceObjectInfo
-
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). -
atlas
Returns the value of theatlasrecord component.- Returns:
- the value of the
atlasrecord component
-
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-