Record Class SingleFile
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.texture.atlas.sources.SingleFile
- All Implemented Interfaces:
SpriteSource, SpriteSourceExtension
public record SingleFile(Identifier resourceId, Optional<Identifier> spriteId)
extends Record
implements SpriteSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface SpriteSource
SpriteSource.DiscardableLoader, SpriteSource.Loader, SpriteSource.Output -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerstatic final com.mojang.serialization.MapCodec<SingleFile> private final IdentifierThe field for theresourceIdrecord component.private final Optional<Identifier> The field for thespriteIdrecord component.Fields inherited from interface SpriteSource
TEXTURE_ID_CONVERTER -
Constructor Summary
ConstructorsConstructorDescriptionSingleFile(Identifier resourceId) SingleFile(Identifier resourceId, Optional<Identifier> spriteId) Creates an instance of aSingleFilerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SingleFile> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theresourceIdrecord component.voidrun(ResourceManager resourceManager, SpriteSource.Output output) spriteId()Returns the value of thespriteIdrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface SpriteSourceExtension
run
-
Field Details
-
resourceId
The field for theresourceIdrecord component. -
spriteId
The field for thespriteIdrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
MAP_CODEC
-
-
Constructor Details
-
SingleFile
-
SingleFile
Creates an instance of aSingleFilerecord class.- Parameters:
resourceId- the value for theresourceIdrecord componentspriteId- the value for thespriteIdrecord component
-
-
Method Details
-
run
- Specified by:
runin interfaceSpriteSource
-
codec
- Specified by:
codecin interfaceSpriteSource
-
toString
-
hashCode
-
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). -
resourceId
Returns the value of theresourceIdrecord component.- Returns:
- the value of the
resourceIdrecord component
-
spriteId
Returns the value of thespriteIdrecord component.- Returns:
- the value of the
spriteIdrecord component
-